why does running a Meteor app break ability to run other Meter app? - meteor

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

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 app crashing when I run it on cmd

I am new to meteor please help. I created my first app but when I try to run it so that I can view it on the browser I get the following error message:
C:\projects\myapp>meteor
[[[[[ C:\projects\myapp ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Errors prevented startup:
While loading plugin `compileTemplatesBatch` from package `templating`:
module.js:338:15: Cannot find module '../modules/es6.object.get-own-property-descriptor'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous>
(C:\Users\user1\AppData\Local\.meteor\packages\templating\1.1.7\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\ecmascript-runtime\node_modules\meteor\ecmascript-runtime\node_modules\meteor-ecmascript-runtime\node_modules\core-js\es6\object.js:12:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous>
(C:\Users\user1\AppData\Local\.meteor\packages\templating\1.1.7\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\ecmascript-runtime\node_modules\meteor\ecmascript-runtime\node_modules\meteor-ecmascript-runtime\server.js:1:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at npmRequire (C:\tools\isobuild\bundler.js:1665:14)
at Module.useNode (packages/modules-runtime.js:453:20)
at fileEvaluate (packages/modules-runtime.js:157:20)
at require (packages/modules-runtime.js:92:16)
at meteorInstall.node_modules.meteor.ecmascript-runtime.runtime.js (packages/ecmascript-runtime.js:24:18)
at fileEvaluate (packages/modules-runtime.js:158:9)
at require (packages/modules-runtime.js:92:16)
at packages/ecmascript-runtime.js:2832:15
at packages/ecmascript-runtime.js:2845:3
=> Your application has errors. Waiting for file change.
I haven't edited the default application that's created when you create an application in cmd. I simply followed tutorial instructions on how to run a created app so that you view it on the browser.
This issue popped up from the recent 1.3 release on Windows platform. By the way, community has already found a workaround. Following the steps described in this issue by #adanlozano you should resolve the error:
Navigate to C:\Users\YOUR_USER_NAME\AppData\Local\.meteor\packages
and delete the issue package folders entirely (templating, templating-tools, ecmascript, standard-minifier-css)
Run your terminal window as Administrator to ensure no issues remaining in the project directory where your App is located.
Run meteor and wait patiently as it attempts to download the missing packages, this might take a while.
For future visitors, this issue has been fixed in Meteor 1.3.1. See ramijarrar's comment on the relevant Github issue.

I can't get laika to work with bdd

I'm using meteor 0.6.4.1, laika 0.2.24 and node.js 0.10.12. Tests with tdd worked fine, but I tried to use bdd with laika and it failed. I downloaded this demo project https://github.com/zvictor/laika-extended-example but also failed. I made a simple test with mocha and should (only node.js, not meteor) and worked fine. This is the error I got with the demo project:
module.js:340
throw err;
^
Error: Cannot find module 'should'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/tests/$setup.js:1:72)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Edit
I installed should with sudo npm install -g should
Edit 2
Based on skishore comment, I used npm link should and now the problem changed. First, I got it:
injecting laika...
loading phantomjs...
loading initial app pool...
And nothing more happen so I tried with laika -D to see the logs:
[laika log] accepting the following extensions: (js)
injecting laika...
loading phantomjs...
[app touch log] [[[[[ ~/Documents/Pruebas/Meteor/laika-extended-example ]]]]]
[app touch log] => Meteor server running on: http://localhost:20472/
loading initial app pool...
[laika log] using nodejs bin(from meteor): /Users/camilo/.meteor/tools/11f45b3996/bin/node
[server log]
[server log] /Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/.meteor/local/build/server/server.js:325
}).run();
^
[server log] ReferenceError: module is not defined
at app/node_modules/should/lib/eql.js:5:1
at /Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/.meteor/local/build/server/server.js:286:12
at Array.forEach (native)
at Function._.each._.forEach (/Users/camilo/.meteor/tools/11f45b3996/lib/node_modules/underscore/underscore.js:79:11)
at run (/Users/camilo/Documents/Pruebas/Meteor/laika-extended-example/.meteor/local/build/server/server.js:227:7)
From the readme in the Github: you need to install should. Use npm:
sudo npm install -g should

Resources