XervoIO/demeteorizer

Meteor app errors. Can't find npm module 'meteor-deque'

Closed this issue · 32 comments

I've tried deploying with version 4 CLI, but I get errors and project isn't working.

meteor-dev-bundle@0.0.0 start /mnt/app/TryForSpecs/app/.meteor/local/build/programs/server
node ../../main.js

/mnt/app/TryForSpecs/app/.meteor/local/build/programs/server/boot.js:286
}).run();
^
Error: Can't find npm module 'meteor-deque'. Did you forget to call 'Npm.depends' in package.js within the 'meteor' package?
at Object.Npm.require (/mnt/app/TryForSpecs/app/.meteor/local/build/programs/server/boot.js:178:17)
at Meteor.startup (packages/meteor/fiber_helpers.js:17:1)
at packages/meteor/fiber_helpers.js:182:1
at /mnt/app/TryForSpecs/app/.meteor/local/build/programs/server/packages/meteor.js:1318:3
at /mnt/app/TryForSpecs/app/.meteor/local/build/programs/server/boot.js:245:10
at Array.forEach (native)
at Function..each..forEach (/mnt/app/TryForSpecs/app/.meteor/local/build/programs/server/node_modules/underscore/underscore.js:79:11)
at /mnt/app/TryForSpecs/app/.meteor/local/build/programs/server/boot.js:140:5

npm ERR! Linux 3.13.0-76-generic
npm ERR! argv "node" "/mnt/app/.modulus/nvm/v0.10.41/bin/npm" "start"
npm ERR! node v0.10.41
npm ERR! npm v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! meteor-dev-bundle@0.0.0 start: node ../../main.js
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the meteor-dev-bundle@0.0.0 start script 'node ../../main.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the meteor-dev-bundle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ../../main.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /mnt/app/TryForSpecs/app/.meteor/local/build/programs/server/npm-debug.log
Now using node v0.10.41
Found package.json: ./TryForSpecs/app/.meteor/local/build/programs/server/package.json
Start script specified in package.json: node ../../main.js
Running command: npm start

This is an error report for demeteorizer -- not for modulus deployment. What exactly are you trying to do and the previous steps you did? IIRC meteor-deque isn't a stock meteor package (core) is it? Is this something you added?

To my knowledge, it's nothing I've added. I simply uploaded my meteor project and had some other errors, but the were from not setting up my package.json. Now this is far as I get. I've tried using the browser and the CLI tool to deploy with no success. I always get this error.

@sjmcdowall is this still an issue for you? If so, can you update your CLI to modulus@next, set your project runtime to Meteor, and then deploy again? You will also have to fully stop/start your project to pick up the runtime change.

@HarlanJ -- I'm not the one with the issue, @trustydusty82 was.

😞 Ah I'm sorry. @trustydusty82 let me know if the steps I listed above solve your problem or not.

@trustydusty82 if you're still experiencing these problems please re-open this issue. I'm going to close it for now though.

I'm having the same issue. Deployed app using node.js env and I get the following error in production (running the demeteorized app locally works fine):

> meteor-dev-bundle@0.0.0 start /mnt/app/bundle/programs/server
> node ../../main

/mnt/app/bundle/programs/server/boot.js:338
}).run();
   ^

Error: Can't find npm module 'meteor-deque'. Did you forget to call 'Npm.depends' in package.js within the 'meteor' package?
    at Object.Npm.require (/mnt/app/bundle/programs/server/boot.js:203:17)
    at packages/meteor/fiber_helpers.js:17:1
    at packages/meteor/fiber_helpers.js:182:1
    at /mnt/app/bundle/programs/server/packages/meteor.js:1365:3
    at /mnt/app/bundle/programs/server/boot.js:297:10
    at Array.forEach (native)
    at Function._.each._.forEach (/mnt/app/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
    at /mnt/app/bundle/programs/server/boot.js:133:5

npm ERR! Linux 3.13.0-88-generic
npm ERR! argv "/mnt/app/.modulus/nvm/versions/node/v4.4.7/bin/node" "/mnt/app/.modulus/nvm/versions/node/v4.4.7/bin/npm" "start"
npm ERR! node v4.4.7
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! meteor-dev-bundle@0.0.0 start: `node ../../main`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the meteor-dev-bundle@0.0.0 start script 'node ../../main'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the meteor-dev-bundle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ../../main
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/app/bundle/programs/server/npm-debug.log

I tried adding the meteor-deque package manually to the package.json (<meteor app dir>/.demeteorized/bundle/programs/server/package.json) but now the app can't find the MongoDB package:

Now using node v4.4.7 (npm v3.10.5)
Found package.json: ./bundle/programs/server/package.json
Running command: npm start

> meteor-dev-bundle@0.0.0 start /mnt/app/bundle/programs/server
> node ../../main

/mnt/app/bundle/programs/server/boot.js:338
}).run();
   ^

Error: Can't find npm module 'mongodb'. Did you forget to call 'Npm.depends' in package.js within the 'npm-mongo' package?
    at Object.Npm.require (/mnt/app/bundle/programs/server/boot.js:203:17)
    at packages/npm-mongo/wrapper.js:1:1
    at packages/npm-mongo/wrapper.js:2:1
    at packages/npm-mongo/wrapper.js:2:1
    at /mnt/app/bundle/programs/server/boot.js:297:10
    at Array.forEach (native)
    at Function._.each._.forEach (/mnt/app/bundle/programs/server/node_modules/underscore/underscore.js:79:11)
    at /mnt/app/bundle/programs/server/boot.js:133:5

npm ERR! Linux 3.13.0-88-generic
npm ERR! argv "/mnt/app/.modulus/nvm/versions/node/v4.4.7/bin/node" "/mnt/app/.modulus/nvm/versions/node/v4.4.7/bin/npm" "start"
npm ERR! node v4.4.7
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE
npm ERR! meteor-dev-bundle@0.0.0 start: `node ../../main`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the meteor-dev-bundle@0.0.0 start script 'node ../../main'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the meteor-dev-bundle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ../../main
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs meteor-dev-bundle
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls meteor-dev-bundle
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/app/bundle/programs/server/npm-debug.log

Is there still no solution to simply specify the node version using the meteor runtime? This issue is not solved and should be reopened.

@djwatt5 what was the demeteorizer command you ran along with the flags?

@HarlanJ demeteorizer --node-version 4.4.7

@djwatt5 can you try with the --server-only flag? You can replicate our build image's demeteorizer steps.

@HarlanJ attempted and still getting the same errors

@djwatt5 since that package is probably not in the package.json, have you tried adding it there?

@HarlanJ I retried adding the package to <project dir>/package.json to no effect, and manually to <project dir>/.demeteorized/bundle/programs/server/package.json and get the mongodb error. After also adding the mongodb package, now it can't find meteor-babel. I suspect many packages are not being added or that they are being read in the wrong place.

demeteorizer is running meteor build in the background and then creating a package.json. Is there a package.json in the root of your project?

@djwatt5

@HarlanJ yes, there is.

Give this a shot:

$ demeteorizer --server-only --node-version 4.4.7
$ npm install --production # only if you have a package.json in the root of your project
$ mv ./node_modules ./demeteorized/bundle/programs/server # only if you have a package.json in the root of your project
$ cd .demeteorized
$ modulus deploy

@HarlanJ this is exactly what I have been trying since the beginning.

Just tried removing the package.json and omitting the two commented lines and the error is the same.

@djwatt5 what are the specs on your machine? Like OS?

Mac OS X 10.11.3. Keep in mind that the demeteorized app works locally though. The problem only occurs in modulus

Can you send me the id of the project that holds your meteor code?

@HarlanJ If the project id refers to the five numbers in the URL, it is 67494.

+1

I'm having the same issue

+1

Exact same issue here. Project ID: 30927

I've experienced this issue on Windows, Mac, and Linux.

I made sure to 'demeteorize' the app on a Ubuntu system. Command line failed to deploy properly but zipping up the contents of the demeteorized folder did the trick. Workaround found :)

Hmmm... add us to the list of people experiencing this problem.

same here can't deploy my meteor app on aws

new build image and CLI is public, please update and try deploying again if you were having issues.

npm i modulus@latest -g

+1 I'm having the same issue

I think the problem here is server/npm/node_modules folder.

At least in my case, when I remove this folder for make bundle lighter, for fast upload to server, I got the same error, as npm install seems not installing all packages from that folder.

My question here, how can I remove this folder and install it back with npm install, is there any packege.json file with all dependencies on that folder?

@Kostanos And everyone else having this issue please refer to this url : https://gist.github.com/fiveisprime/dd5b55fcbaffc983b828ddb887817296

The thing I was missing is --include-modules flag modulus deploy --include-modules ./ in deploy command. Working fine for me now.