Error: Can't find module "underscore" thrown from boot.js in package meteor
I am using meteor and meteorite npm module. Not sure if the problem is even related to this, but ... I have a small project that I am trying to deploy to virtual virtualbox, but when I start it, I get
module.js:340
throw err;
^
Error: Cannot find module 'underscore'
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> (/var/projects/myapp/live/programs/server/boot.js:5:9)
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)
I've seen this question , but it doesn't seem to be related. Everything works fine for me in development (which means source folder and deployed version).
Reportsmrt --version
$ mrt --version
Meteorite version 0.7.4
Release 0.8.3
my packages.json
for mrt npm
{
"winston": "0.7.3",
"winston-loggly": "1.0.1"
}
Not too big. Mine smart.json
for mrt
{
"packages": {
"collection-api": {},
"iron-router": {},
"npm": {}
}
}
I don't use require
anywhere, onlyMeteor.require
I even tried
mkdir delme
cd delme
mrt create test.app
meteor bundle --directory ../live
It creates the same ones programs/server/boot.js
, including the underline, which doesn't exist. I followed the instructions in the readme. I have fiber
and bcrypt
installed in virtualbox as stated in the readme.
I tried to install underscore
manually. Then I started getting an error in the module source-map-support
. So I added this. Then I started getting a module missing message semver
so I added this and another module was missing. Clearly I missed a step or something, but I had no luck finding it.
ideas?
Update # 1
so i installed meteorite from scratch on virtualbox.
curl https://install.meteor.com | /bin/sh
meteor create test.app
meteor bundle --directory ../test
cd ../test
rm -r programs/server/node_modules/fibers
rm -r programs/server/node_modules/bcrypt
npm install fibers@1.0.1
npm install bcrypt@0.7.7
export MONGO_URL='mongodb://user:password@host:port/databasename'
export ROOT_URL='http://example.com'
node main.js
It worked.
Checking the directory programs/server/node_modules
in this
ls test/programs/server/node_modules/
eachline fstream http-proxy keypress npm semver source-map-support underscore
esprima heapdump kexec node-aes-gcm request source-map tar
Here where the problem is displayed,
ls /var/projects/myapp/live/programs/server/node_modules
bcrypt fibers
maybe something broke my original one meteor bundle
?
Update # 2
SO EMBARRASSING! The problem is what I have node_modules
in mine .gitignore
and I am transferring files via git .: P
source to share
No one has answered this question yet
See similar questions:
or similar: