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
Related
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/
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!
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.
I am developing a meteor app which executes just fine (METEOR#1.2.1) ... However I have witnessed several episodes where after executing a different meteor app which happens to fail like the following one, afterwards when I attempt to run my own app it suddenly starts failing on launch :
Other app :
git clone https://github.com/RocketChat/Rocket.Chat
cd Rocket.Chat
meteor
[[[[[ ~/other_src/Rocket.Chat ]]]]]
=> Started proxy.
=> Started MongoDB.
rocketchat:file: updating npm dependencies -- mkdirp, gridfs-stream, gm...
rocketchat:assets: updating npm dependencies -- image-size...
rocketchat:ldap: updating npm dependencies -- ldapjs...
rocketchat:theme: updating npm dependencies -- less, less-plugin-autoprefix...
rocketchat:tutum: updating npm dependencies -- redis...
rocketchat:ui-sidenav: updating npm dependencies -- less, less-plugin-autoprefix...
steffo:meteor-accounts-saml: updating npm dependencies -- xml2js, xml-crypto, xmldom, connect, xmlbuilder, querystring, xml-encryption...
W20151207-17:15:31.344(-5)? (STDERR)
W20151207-17:15:31.345(-5)? (STDERR) module.js:340
W20151207-17:15:31.346(-5)? (STDERR) throw err;
W20151207-17:15:31.346(-5)? (STDERR) ^
W20151207-17:15:31.346(-5)? (STDERR) Error: Cannot find module 'fibers'
W20151207-17:15:31.346(-5)? (STDERR) at Function.Module._resolveFilename (module.js:338:15)
W20151207-17:15:31.348(-5)? (STDERR) at Function.Module._load (module.js:280:25)
W20151207-17:15:31.348(-5)? (STDERR) at Module.require (module.js:364:17)
W20151207-17:15:31.348(-5)? (STDERR) at require (module.js:380:17)
W20151207-17:15:31.349(-5)? (STDERR) at Object.<anonymous> (/home/scott/other_src/Rocket.Chat/.meteor/local/build/programs/server/boot.js:1:75)
W20151207-17:15:31.349(-5)? (STDERR) at Module._compile (module.js:456:26)
W20151207-17:15:31.349(-5)? (STDERR) at Object.Module._extensions..js (module.js:474:10)
W20151207-17:15:31.349(-5)? (STDERR) at Module.load (module.js:356:32)
W20151207-17:15:31.349(-5)? (STDERR) at Function.Module._load (module.js:312:12)
W20151207-17:15:31.349(-5)? (STDERR) at Module.require (module.js:364:17)
Here is my app ... these errors only started happening after running above app
meteor
[[[[[ ~/other_src/github/myapp ]]]]]
=> Started proxy.
=> Started MongoDB.
W20151207-17:37:03.985(-5)? (STDERR)
W20151207-17:37:03.987(-5)? (STDERR) module.js:340
W20151207-17:37:03.987(-5)? (STDERR) throw err;
W20151207-17:37:03.987(-5)? (STDERR) ^
W20151207-17:37:03.987(-5)? (STDERR) Error: Cannot find module 'fibers'
W20151207-17:37:03.987(-5)? (STDERR) at Function.Module._resolveFilename (module.js:338:15)
W20151207-17:37:03.987(-5)? (STDERR) at Function.Module._load (module.js:280:25)
W20151207-17:37:03.988(-5)? (STDERR) at Module.require (module.js:364:17)
W20151207-17:37:03.988(-5)? (STDERR) at require (module.js:380:17)
W20151207-17:37:03.988(-5)? (STDERR) at Object.<anonymous> (/home/scott/other_src/github/myapp/.meteor/local/build/programs/server/boot.js:1:75)
W20151207-17:37:03.988(-5)? (STDERR) at Module._compile (module.js:456:26)
W20151207-17:37:03.988(-5)? (STDERR) at Object.Module._extensions..js (module.js:474:10)
W20151207-17:37:03.988(-5)? (STDERR) at Module.load (module.js:356:32)
W20151207-17:37:03.989(-5)? (STDERR) at Function.Module._load (module.js:312:12)
W20151207-17:37:03.989(-5)? (STDERR) at Module.require (module.js:364:17)
I know if I remove my ~/.meteor directory and reinstall meteor
curl https://install.meteor.com/ | sh
my own previously working app suddenly starts working fine again.
ubuntu 15.10
I use no special permissions
I get same issue independent of whether I have nodejs (node-v5.1.0) installed or not (meteor does not rely on external nodejs install)
Is this a known bug in meteor ?
Is this meteor behavior intentional ?
Any suggestions on how to avoid this ?
When you run one of them, it is updating the packages, as can be seen in your first code sample "updating dependencies".
Meteor uses your .meteor folder to globally store packages in your machine. I'd say there's probably an issue with your fibers package in its version or for you OS version.
If you run a Meteor app with default settings, it runs on port 3000. Running multiple different Meteor apps on the same port can cause aforementioned problem. To make apps run on different ports, try to use --port parameter, like
$ meteor run --port 4000
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.