Why does `mrt test-packages ./ ` fails when `meteor test-packages ./` does not - meteor

mrt test-packages ./ fails for my dummy package but if I copy that package to meteor (renaming it's enclosing folder without the meteor- prefix), meteor test-packages ./ succeeds.
It looks like it's due to using _transitional_registerBuildPlugin, because for other meteorite packages there is no such problem.
Is this a meteorite bug? a meteor bug? something else I'm missing?
My (extremely minimal) package: https://github.com/marcandre/meteor-dummy
Here's the backtrace I get:
$ mrt --version
Meteorite version 0.6.16
Release 0.6.6.3
$ mrt test-packages ./
(...)
TypeError: Cannot read property 'name' of undefined
at /Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:703:28
at Function._.each._.forEach (/Users/mal/.meteor/tools/0b2f28e18b/lib/node_modules/underscore/underscore.js:87:22)
at /Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:698:9
at Array.forEach (native)
at Function._.each._.forEach (/Users/mal/.meteor/tools/0b2f28e18b/lib/node_modules/underscore/underscore.js:79:11)
at _.extend._allHandlers (/Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:697:7)
at _.extend._getSourceHandler (/Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:729:25)
at /Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:240:50
at Array.forEach (native)
at Function._.each._.forEach (/Users/mal/.meteor/tools/0b2f28e18b/lib/node_modules/underscore/underscore.js:79:11)
at _.extend.build (/Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:235:7)
at /Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:1041:13
at Array.forEach (native)
at Function._.each._.forEach (/Users/mal/.meteor/tools/0b2f28e18b/lib/node_modules/underscore/underscore.js:79:11)
at _.extend.build (/Users/mal/.meteor/tools/0b2f28e18b/tools/packages.js:1040:7)
at /Users/mal/.meteor/tools/0b2f28e18b/tools/library.js:251:15
at Object.enterJob (/Users/mal/.meteor/tools/0b2f28e18b/tools/buildmessage.js:219:15)
at _.extend.get (/Users/mal/.meteor/tools/0b2f28e18b/tools/library.js:236:22)
at /Users/mal/.meteor/tools/0b2f28e18b/tools/bundler.js:492:54
at Array.map (native)
at Function._.map._.collect (/Users/mal/.meteor/tools/0b2f28e18b/lib/node_modules/underscore/underscore.js:97:56)
at _.extend._determineLoadOrder (/Users/mal/.meteor/tools/0b2f28e18b/tools/bundler.js:491:11)
at _.extend.make (/Users/mal/.meteor/tools/0b2f28e18b/tools/bundler.js:440:10)
at makeClientTarget (/Users/mal/.meteor/tools/0b2f28e18b/tools/bundler.js:1558:14)
at /Users/mal/.meteor/tools/0b2f28e18b/tools/bundler.js:1615:20
at Object.capture (/Users/mal/.meteor/tools/0b2f28e18b/tools/buildmessage.js:175:5)
at Object.exports.bundle (/Users/mal/.meteor/tools/0b2f28e18b/tools/bundler.js:1546:31)
at /Users/mal/.meteor/tools/0b2f28e18b/tools/run.js:509:32
at /Users/mal/.meteor/tools/0b2f28e18b/tools/fiber-helpers.js:24:12
```

Related

How can I first launch the project with VulcanJS?

I've just started to install Vulcan Js on my computer. So I follow the tuto on official website.
And after I execute npm start, I've got this error.
> npm start
> vulcan-meteor#1.16.1 start
> meteor --settings settings.json
[[[[[ ~/Sites/Vulcan/Vulcan ]]]]]
=> Started proxy.
=> Started MongoDB.
W20210326-10:29:14.756(1)? (STDERR) /Users/imac/.meteor/packages/meteor-tool/.2.1.0.23f9er.0sbtf++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20210326-10:29:14.872(1)? (STDERR) throw(ex);
W20210326-10:29:14.873(1)? (STDERR) ^
W20210326-10:29:14.873(1)? (STDERR)
W20210326-10:29:14.873(1)? (STDERR) TypeError: Cannot read property 'upsert' of undefined
W20210326-10:29:14.873(1)? (STDERR) at packages/vulcan:accounts/imports/oauth_config.js:8:41
W20210326-10:29:14.874(1)? (STDERR) at Array.forEach (<anonymous>)
W20210326-10:29:14.874(1)? (STDERR) at module (packages/vulcan:accounts/imports/oauth_config.js:7:25)
W20210326-10:29:14.874(1)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20210326-10:29:14.874(1)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20210326-10:29:14.875(1)? (STDERR) at Module.moduleLink [as link] (/Users/imac/.meteor/packages/modules/.0.16.0.3rozyi.4j6sy++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/reify/lib/runtime/index.js:52:22)
W20210326-10:29:14.875(1)? (STDERR) at module (packages/vulcan:accounts/main_server.js:1:356)
W20210326-10:29:14.875(1)? (STDERR) at fileEvaluate (packages/modules-runtime.js:336:7)
W20210326-10:29:14.875(1)? (STDERR) at Module.require (packages/modules-runtime.js:238:14)
W20210326-10:29:14.876(1)? (STDERR) at require (packages/modules-runtime.js:258:21)
W20210326-10:29:14.876(1)? (STDERR) at /Users/imac/Sites/Vulcan/Vulcan/.meteor/local/build/programs/server/packages/vulcan_accounts.js:3282:15
W20210326-10:29:14.876(1)? (STDERR) at /Users/imac/Sites/Vulcan/Vulcan/.meteor/local/build/programs/server/packages/vulcan_accounts.js:3287:3
W20210326-10:29:14.876(1)? (STDERR) at /Users/imac/Sites/Vulcan/Vulcan/.meteor/local/build/programs/server/boot.js:401:38
W20210326-10:29:14.876(1)? (STDERR) at Array.forEach (<anonymous>)
W20210326-10:29:14.877(1)? (STDERR) at /Users/imac/Sites/Vulcan/Vulcan/.meteor/local/build/programs/server/boot.js:226:21
W20210326-10:29:14.877(1)? (STDERR) at /Users/imac/Sites/Vulcan/Vulcan/.meteor/local/build/programs/server/boot.js:464:7
W20210326-10:29:14.877(1)? (STDERR) at Function.run (/Users/imac/Sites/Vulcan/Vulcan/.meteor/local/build/programs/server/profile.js:280:14)
W20210326-10:29:14.877(1)? (STDERR) at /Users/imac/Sites/Vulcan/Vulcan/.meteor/local/build/programs/server/boot.js:463:13
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.
I don't know what to do.
Follow my config:
Meteor version : 2.1
NPM version : 7.7.4
Vulcan git branch : devel
Make sure you follow the steps of installation as specified:
Install node and npm - I prefer to use n
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n
bash n lts
Install Meteor
curl https://install.meteor.com/ | sh
Clone the starter repo
git clone https://github.com/VulcanJS/Vulcan-Starter && cd Vulcan-Starter
Rename simple_settings.json to settings.json
mv sample_settings.json settings.json
Install npm packages
meteor npm install
Start the application
meteor npm start
Your app should be working at http://localhost:3000/

Cannot find module '#babel/runtime/helpers/builtin/objectSpread' after update meteor to 1.6.1.1

i updated my meteor project to Meteor 1.6.1.1. and i got this error message
=> Exited with code: 1
W20180403-15:33:17.531(2)? (STDERR) E:\Personnal folders\quicktext5\.meteor\local\build\programs\server\boot.js:475
W20180403-15:33:17.534(2)? (STDERR) }).run();
W20180403-15:33:17.535(2)? (STDERR) ^
W20180403-15:33:17.539(2)? (STDERR)
W20180403-15:33:17.540(2)? (STDERR) Error: Cannot find module '#babel/runtime/helpers/builtin/objectSpread'
W20180403-15:33:17.541(2)? (STDERR) at Function.Module._resolveFilename (module.js:547:15)
W20180403-15:33:17.543(2)? (STDERR) at Function.resolve (internal/module.js:18:19)
W20180403-15:33:17.547(2)? (STDERR) at Object.require (E:\Personnal folders\quicktext5\.meteor\local\build\programs\server\boot.js:288:32)
W20180403-15:33:17.548(2)? (STDERR) at makeInstallerOptions.fallback (packages\modules-runtime.js:651:18)
W20180403-15:33:17.548(2)? (STDERR) at require (packages\modules-runtime.js:244:16)
W20180403-15:33:17.549(2)? (STDERR) at livedata_connection.js (E:\Personnal folders\quicktext5\.meteor\local\build\programs\server\packages\ddp-client.js:149:45)
W20180403-15:33:17.550(2)? (STDERR) at fileEvaluate (packages\modules-runtime.js:343:9)
W20180403-15:33:17.550(2)? (STDERR) at require (packages\modules-runtime.js:238:16)
W20180403-15:33:17.551(2)? (STDERR) at namespace.js (packages/ddp-client/common/namespace.js:1:300)
W20180403-15:33:17.556(2)? (STDERR) at fileEvaluate (packages\modules-runtime.js:343:9)
i tried to delete the node_modules folder and run npm install .
I also tried to install meteor npm install --save babel-runtime
but still got the same Error
Any suggestions ?
Well since the meteor-babel npm package has been updated to version 7.0.0-beta.44, which may require updating any custom Babel plugins I have enabled in a .babelrc file, I tried to running the following command to update #babel/runtime:
meteor npm install #babel/runtime#latest
Thanks to #robfallows who answered my question in Meteor forums
https://forums.meteor.com/t/cannot-find-module-babel-runtime-helpers-builtin-objectspread-after-update-meteor-to-1-6-1-1/43034
In case someone is still having the same problem, if you are not using meteor1.7.x then the latest version of babel/runtime might not fix the error for you as it didn't fix for me, what worked however was to use.
meteor npm install babel/runtime#7.0.0-beta.55
The best option would be however to update to the latest version of Meteor but if you aren't ready use the beta version above it will fix the error.
Updated to Meteor 1.7 which identified the error, said to do this:
meteor npm install --save-exact #babel/runtime#7.0.0-beta.55
Back online!

meteor test fails with SyntaxError: Unexpected reserved word

when I run the command meteor test --driver-package practicalmeteor:mocha I get the following error:
W20170314-15:20:44.067(-4)? (STDERR) /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/packages/znewsham_justplay-common.js:971
W20170314-15:20:44.068(-4)? (STDERR) import { Random } from 'meteor/random';
W20170314-15:20:44.068(-4)? (STDERR) ^^^^^^
W20170314-15:20:44.068(-4)? (STDERR)
W20170314-15:20:44.069(-4)? (STDERR) SyntaxError: Unexpected reserved word
W20170314-15:20:44.069(-4)? (STDERR) at Object.exports.runInThisContext (vm.js:53:16)
W20170314-15:20:44.070(-4)? (STDERR) at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:289:30
W20170314-15:20:44.072(-4)? (STDERR) at Array.forEach (native)
W20170314-15:20:44.073(-4)? (STDERR) at Function._.each._.forEach (/home/danilo/.meteor/packages/meteor-tool/.1.4.2_6.wp5fef++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20170314-15:20:44.074(-4)? (STDERR) at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:128:5
W20170314-15:20:44.074(-4)? (STDERR) at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:344:5
W20170314-15:20:44.075(-4)? (STDERR) at Function.run (/tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/profile.js:480:12)
W20170314-15:20:44.076(-4)? (STDERR) at /tmp/meteor-test-runfh1j93/.meteor/local/build/programs/server/boot.js:343:11
I dont get this on all machines I run it on, nor does it appear when not using tests.
I've tried reinstalling node, npm, meteor, removing the node_modules and reinstalling and installing babel-present-meteor.
I've had the issue before, but it either just went away on its own, or one of the hundreds of things I tried at the time got rid of it - but I can't get it working now. Any thoughts?
meteor version is 1.4.2.6
node is v4.7.3
npm is 4.1.2
The import and export words are part of ECMAScript 2015
Can you make sure you have the ecmascript package installed?
https://docs.meteor.com/packages/ecmascript.html

Meteor package fails to import or not supporting ES6

I'm trying to convert an NPM package into a Meteor package, I forked the repo from github and made changes to it.
Now I'm trying to port it, it depends on, and uses other NPM packages.
Full stack trace for the first file throwing the SyntaxError, if I comment the import it picks a different file that also has an import statement, maths is an external NPM package defined as a requirement in my root meteor's app package.json
(STDERR) in the root directory of your application.
(STDERR) /Users/octohedron/Documents/App/.meteor/local/build/programs/server/packages/my_package.js:1924
(STDERR) import { MyClass } from 'maths/dist/edit';
(STDERR) ^^^^^^
(STDERR)
(STDERR) SyntaxError: Unexpected reserved word
(STDERR) at Object.exports.runInThisContext (vm.js:53:16)
(STDERR) at /Users/octohedron/Documents/App/.meteor/local/build/programs/server/boot.js:287:30
(STDERR) at Array.forEach (native)
(STDERR) at Function._.each._.forEach (/Users/octohedron/.meteor/packages/meteor-tool/.1.4.1_1.ge5qu0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
(STDERR) at /Users/octohedron/Documents/App/.meteor/local/build/programs/server/boot.js:128:5
import { MyClass } from 'maths/dist/edit'; => maths is an npm package specified in my package.json at the root of my meteor project.
Do I have to manually transpile all this code to vanilla jS to be able to use it in my custom meteor package?
/client/ folder doesn't support ES6.

Installation of Natural package in meteor throws uncaught exception

I am working on a project based on meteor framework. For natural language facility, have installed natural package using "npm install natural" command. For this, have used following link "https://github.com/NaturalNode/natural".
When I run the app,it is throwing the following error
--
W20140521-14:22:08.096(1)? (STDERR) /home/priya/.meteor/tools/09b63f1ed5/lib/node_modules/fibers/future.js:173
W20140521-14:22:08.385(1)? (STDERR) throw(ex);
W20140521-14:22:08.386(1)? (STDERR) ^
W20140521-14:22:08.386(1)? (STDERR) ReferenceError: require is not defined
W20140521-14:22:08.387(1)? (STDERR) at app/node_modules/natural/node_modules/apparatus/lib/apparatus/classifier/bayes_classifier.js:23:12
W20140521-14:22:08.387(1)? (STDERR) at app/node_modules/natural/node_modules/apparatus/lib/apparatus/classifier/bayes_classifier.js:134:3
W20140521-14:22:08.387(1)? (STDERR) at /home/priya/gbproject/.meteor/local/build/programs/server/boot.js:155:10
W20140521-14:22:08.388(1)? (STDERR) at Array.forEach (native)
W20140521-14:22:08.388(1)? (STDERR) at Function..each..forEach (/home/priya/.meteor/tools/09b63f1ed5/lib/node_modules/underscore/underscore.js:79:11)
W20140521-14:22:08.388(1)? (STDERR) at /home/priya/gbproject/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
--
I have not written any code after it's installation, then why showing this error. Googled also but could not get the solution. Any pointers please. Thanks in advance
0: Remove the "node_modules" directory at the root of your application if it exists (it should be created when you run npm install natural).
1: If you need to install a NPM package with Meteor, I recommend you add the NPM package with mrt:
mrt add npm
2: Then, you should add your npm package inside the packages.json file (created during step 1 at the root of your application).
{
"natural": "0.1.27",
}
3: Then, use Meteor.require('natural')in your file instead of NPM.require('natural').
4: Launch Meteor and check that everything works as expected.

Resources