Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm dependencies in package.json are not being installed #65

Closed
tomyo opened this issue Aug 28, 2017 · 14 comments
Closed

Npm dependencies in package.json are not being installed #65

tomyo opened this issue Aug 28, 2017 · 14 comments

Comments

@tomyo
Copy link

tomyo commented Aug 28, 2017

The first error I get is:

 Note: you are using a pure-JavaScript implementation of bcrypt.
> While this implementation will work correctly, it is known to be
> approximately three times slower than the native implementation.
> In order to use the native implementation instead, run
>   meteor npm install --save bcrypt
> in the root directory of your application.

But in package.json, I have it:

{
  "name": "appName",
  "private": true,
  "scripts": {
    "start": "meteor run"
  },
  "dependencies": {
    "bcrypt": "^0.8.7",
    (....)
  }
}

It works OK in galaxy, and locally, but I can't get it to work on now.
Any idea someone?
Thanks.

@vladejs
Copy link

vladejs commented Aug 28, 2017

It also happened to me.

What I know is that this happens when you install your project dependencies with npm install instead of meteor npm install.

So it makes me think that the real problem occurs when the dependencies are installed with a node/npm version different from the one used internally by Meteor.

We should try putting the "engines" property on package.json equals to the node/npm version meteor is using in order to see if it solves the problem.

Something like:

"engines": {
  "npm": "4.5.0",
  "node": "4.8.1"
}

I am aware that now service uses always latest versions of node/npm.

Let me know if it solves the issue

@tomyo
Copy link
Author

tomyo commented Aug 29, 2017

Hi @vladejs, thanks for the suggestion.
I went under ~/.meteor/packages/meteor-tool/1.5.1/mt-os.osx.x86_64/dev_bundle/bin to find the versions, and added to package.json:

"engines": {
    "npm": "5.3.0",
    "node": "4.8.4"
  }

sadly, nothing changed.

What else can I try?
Thanks!

@jkrup
Copy link
Owner

jkrup commented Aug 31, 2017

@tomyo is it failing to deploy too or just showing that Note ? Because it says it: will work correctly, it is known to be approximately three times slower than the native implementation

@vladejs
Copy link

vladejs commented Aug 31, 2017

@jkrup .
It's not failing to deploy, but I feel like so, because not having bcrypt properly installed incurs on great hits on performance.

Is this difficult to solve?

@tomyo
Copy link
Author

tomyo commented Aug 31, 2017

Deploys fine, but it keeps restarting, as required dependencies are not being installed, or loaded.
The app fails with the error:

 /bundle/programs/server/node_modules/fibers/future.js:280
						throw(ex);
						^
Error: Module ursa must be installed

And I have it under "dependencies": {...}

@jkrup
Copy link
Owner

jkrup commented Aug 31, 2017

Okay. It's definitely an issue and would be great to fix. But as far as I'm aware bcrypt will only be used when logging in / creating passwords / etc so probably won't be noticable performance impact.

I did some googling and it looks like the Dockerfile we use may not be capable of building bcrypt. I'll try to update it as per these dependencies https://github.com/nodejs/node-gyp#installation

@vladejs
Copy link

vladejs commented Aug 31, 2017

so probably won't be noticable performance impact

Let's make 100 concurrent users login at the same time

I'll try to update it as per these dependencies https://github.com/nodejs/node-gyp#installation

That would be great

@tomyo
Copy link
Author

tomyo commented Aug 31, 2017

@jkrup, in case you missed my comment, seems like no dependencies at all are being installed, for me at least.

@tomyo
Copy link
Author

tomyo commented Oct 3, 2017

Anyone else with this problem? For me is very serious, with packages not being installed, meteor-now became unusable for me. Have this payed account in now waiting..

@purplecones
Copy link
Collaborator

@tomyo can you post the entire log you see when you deploy with -d flag and your package.json file?

@tomyo
Copy link
Author

tomyo commented Oct 3, 2017

Sure, I just did a fresh deploy, this are the logs:

Note: you are using a pure-JavaScript implementation of bcrypt.
While this implementation will work correctly, it is known to be
approximately three times slower than the native implementation.
In order to use the native implementation instead, run

  meteor npm install --save bcrypt

in the root directory of your application.
Kadira: completed instrumenting the app
10/03 10:45 AM (16s)
{ "line": "106", "file": "percolate_migrations.js", "message": "Migrations: Not migrating, control is locked.", "time": { "$date": 1507038328636 }, "level": "info" }

/bundle/programs/server/node_modules/fibers/future.js:280
						throw(ex);
						^

Error: Module ursa must be installed to use WSSecurityCertTBK
    at new WSSecurityCertTBK (/bundle/programs/server/npm/node_modules/transbank/lib/security/WSSecurityCertTBK.js:42:11)
    at new TBK (/bundle/programs/server/npm/node_modules/transbank/lib/tbk.js:20:21)
    at imports/startup/server/server.coffee:65:12
    at Function.time (/bundle/programs/server/profile.js:309:28)
    at /bundle/programs/server/boot.js:347:13
    at /bundle/programs/server/boot.js:388:5
    at Function.run (/bundle/programs/server/profile.js:510:12)
    at /bundle/programs/server/boot.js:386:11

Here's package.json:

{
  "name": "appName",
  "private": true,
  "scripts": {
    "start": "meteor run --settings=development.settings.json",
    "deploy-production": "DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy www.feriaferio.cl --settings production.settings.json",
    "deploy-beta": "DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy beta.feriaferio.cl --settings beta.settings.json"
  },
  "engines": {
    "npm": "5.3.0",
    "node": "4.8.4"
  },
  "dependencies": {
    "aws-sdk": "^2.70.0",
    "babel-runtime": "^6.18.0",
    "bcrypt": "^0.8.7",
    "body-parser": "^1.15.2",
    "cheerio": "^0.22.0",
    "core-js": "^2.5.0",
    "meteor-node-stubs": "^0.2.11",
    "soap": "^0.16.0",
    "transbank": "^1.1.2",
    "ursa": "^0.9.4",
    "wnumb": "^1.0.4"
  }
}

Here's the meteor-now deploy -d output:

[METEOR-NOW] - running command: meteor build .meteor/local/builds --server-only --architecture=os.linux.x86_64
                                              
WARNING: The output directory is under your source tree.
         Your generated files may get interpreted as source code!
         Consider building into a different directory instead
         meteor build ../output
                                              
[METEOR-NOW] - creating Dockerfile            
[METEOR-NOW] - splitting bundle
[METEOR-NOW] - looking for meteor settings file production.settings.json in root of project
[METEOR-NOW] - found settings file
[METEOR-NOW] - running command: cd .meteor/local/builds && now -e PORT=3000   -d -e NODE_ENV=production -e MONGO_URL="(...)" -e ROOT_URL=(...) -e METEOR_SETTINGS='(....)'
> Deploying ~/proyectos/feriaferio/app/.meteor/local/builds under tomyo
> [debug] Detected `deploymentType` = `docker`
> [debug] Detected `deploymentName` = ""app""
> [debug] locating files /home/tomyo/proyectos/feriaferio/app/.meteor/local/builds: 11.974ms
> [debug] Getting files: 14.862ms
> [debug] Computing hashes: 479.418ms
> [debug] /now/create: 3583.258ms
> Ready! https://app-gwtkkqtgwk.now.sh [4s]
> [debug] total files 122, 121 changed. 
> [debug] Will upload 121 files in 13 steps of 10 uploads.
<uploaded>
> Synced 121 files (114.89MB) [29m] 
> Initializing…
> [debug] closing agent
> Building
> ▲ docker build
Sending build context to Docker daemon 120.6 MBkB
> Step 1 : FROM node:boron
>  ---> 8095ae5163c9
> Step 2 : ENV NPM_CONFIG_LOGLEVEL warn
>  ---> Using cache
>  ---> e13d9ab3f3b5
> Step 3 : LABEL name "app"
>  ---> Running in 211645b8acd1
>  ---> 84b29f0c8733
> Removing intermediate container 211645b8acd1
> Step 4 : COPY . .
>  ---> 02d8d11845a8
> Removing intermediate container 1f3235aca06a
> Step 5 : RUN cat *sf-part* > bundle.tar.gz
>  ---> Running in 9d4b89e06e9c
>  ---> f41a4dbe0f46
> Removing intermediate container 9d4b89e06e9c
> Step 6 : RUN tar -xzf bundle.tar.gz
>  ---> Running in 5fdc1b1923ec
>  ---> de00f1e8f7ec
> Removing intermediate container 5fdc1b1923ec
> Step 7 : WORKDIR bundle/programs/server
>  ---> Running in 580c2274bdad
>  ---> 9bbdf02254b7
> Removing intermediate container 580c2274bdad
> Step 8 : RUN npm install
>  ---> Running in e763df440f84
> > fibers@1.0.15 install /bundle/programs/server/node_modules/fibers
> > node build.js || nodejs build.js
> `linux-x64-48` exists; testing
> Binary is fine; exiting
> npm WARN lifecycle meteor-dev-bundle@0.0.0~install: cannot run in wd %s %s (wd=%s) meteor-dev-bundle@0.0.0 node npm-rebuild.js /bundle/programs/server
> meteor-dev-bundle@0.0.0 /bundle/programs/server
> +-- amdefine@1.0.1 
> +-- ansi-regex@0.2.1 
> +-- ansi-styles@1.1.0 
> +-- asap@2.0.6 
> +-- chalk@0.5.1 
> +-- core-util-is@1.0.2 
> +-- duplexer2@0.1.4 
> +-- escape-string-regexp@1.0.5 
> +-- fibers@1.0.15 
> +-- has-ansi@0.1.0 
> +-- inherits@2.0.3 
> +-- isarray@1.0.0 
> +-- meteor-promise@0.8.5 
> +-- multipipe@1.0.2 
> +-- node-gyp@3.6.0 
> | +-- fstream@1.0.11 
> | +-- glob@7.1.2 
> | | +-- fs.realpath@1.0.0 
> | | +-- inflight@1.0.6 
> | | | `-- wrappy@1.0.2 
> | | +-- once@1.4.0 
> | | `-- path-is-absolute@1.0.1 
> | +-- graceful-fs@4.1.11 
> | +-- minimatch@3.0.4 
> | | `-- brace-expansion@1.1.8 
> | |   +-- balanced-match@1.0.0 
> | |   `-- concat-map@0.0.1 
> | +-- mkdirp@0.5.1 
> | | `-- minimist@0.0.8 
> | +-- nopt@3.0.6 
> | | `-- abbrev@1.1.1 
> | +-- npmlog@4.1.2 
> | | +-- are-we-there-yet@1.1.4 
> | | | `-- delegates@1.0.0 
> | | +-- console-control-strings@1.1.0 
> | | +-- gauge@2.7.4 
> | | | +-- aproba@1.2.0 
> | | | +-- has-unicode@2.0.1 
> | | | +-- signal-exit@3.0.2 
> | | | +-- string-width@1.0.2 
> | | | | +-- code-point-at@1.1.0 
> | | | | +-- is-fullwidth-code-point@1.0.0 
> | | | | | `-- number-is-nan@1.0.1 
> | | | | `-- strip-ansi@3.0.1 
> | | | |   `-- ansi-regex@2.1.1 
> | | | +-- strip-ansi@3.0.1 
> | | | | `-- ansi-regex@2.1.1 
> | | | `-- wide-align@1.1.2 
> | | `-- set-blocking@2.0.0 
> | +-- osenv@0.1.4 
> | | +-- os-homedir@1.0.2 
> | | `-- os-tmpdir@1.0.2 
> | +-- request@2.83.0 
> | | +-- aws-sign2@0.7.0 
> | | +-- aws4@1.6.0 
> | | +-- caseless@0.12.0 
> | | +-- combined-stream@1.0.5 
> | | | `-- delayed-stream@1.0.0 
> | | +-- extend@3.0.1 
> | | +-- forever-agent@0.6.1 
> | | +-- form-data@2.3.1 
> | | | `-- asynckit@0.4.0 
> | | +-- har-validator@5.0.3 
> | | | +-- ajv@5.2.3 
> | | | | +-- co@4.6.0 
> | | | | +-- fast-deep-equal@1.0.0 
> | | | | +-- json-schema-traverse@0.3.1 
> | | | | `-- json-stable-stringify@1.0.1 
> | | | |   `-- jsonify@0.0.0 
> | | | `-- har-schema@2.0.0 
> | | +-- hawk@6.0.2 
> | | | +-- boom@4.3.1 
> | | | +-- cryptiles@3.1.2 
> | | | | `-- boom@5.2.0 
> | | | +-- hoek@4.2.0 
> | | | `-- sntp@2.0.2 
> | | +-- http-signature@1.2.0 
> | | | +-- assert-plus@1.0.0 
> | | | +-- jsprim@1.4.1 
> | | | | +-- extsprintf@1.3.0 
> | | | | +-- json-schema@0.2.3 
> | | | | `-- verror@1.10.0 
> | | | `-- sshpk@1.13.1 
> | | |   +-- asn1@0.2.3 
> | | |   +-- bcrypt-pbkdf@1.0.1 
> | | |   +-- dashdash@1.14.1 
> | | |   +-- ecc-jsbn@0.1.1 
> | | |   +-- getpass@0.1.7 
> | | |   +-- jsbn@0.1.1 
> | | |   `-- tweetnacl@0.14.5 
> | | +-- is-typedarray@1.0.0 
> | | +-- isstream@0.1.2 
> | | +-- json-stringify-safe@5.0.1 
> | | +-- mime-types@2.1.17 
> | | | `-- mime-db@1.30.0 
> | | +-- oauth-sign@0.8.2 
> | | +-- performance-now@2.1.0 
> | | +-- qs@6.5.1 
> | | +-- stringstream@0.0.5 
> | | +-- tough-cookie@2.3.3 
> | | | `-- punycode@1.4.1 
> | | +-- tunnel-agent@0.6.0 
> | | `-- uuid@3.1.0 
> | +-- rimraf@2.6.2 
> | +-- tar@2.2.1 
> | | `-- block-stream@0.0.9 
> | `-- which@1.3.0 
> |   `-- isexe@2.0.0 
> +-- node-pre-gyp@0.6.34 
> | +-- nopt@4.0.1 
> | +-- rc@1.2.1 
> | | +-- deep-extend@0.4.2 
> | | +-- ini@1.3.4 
> | | +-- minimist@1.2.0 
> | | `-- strip-json-comments@2.0.1 
> | `-- tar-pack@3.4.0 
> |   +-- debug@2.6.9 
> |   | `-- ms@2.0.0 
> |   +-- fstream-ignore@1.0.5 
> |   `-- uid-number@0.0.6 
> +-- object-assign@4.1.1 
> +-- process-nextick-args@1.0.7 
> +-- promise@8.0.1 
> +-- readable-stream@2.3.3 
> +-- safe-buffer@5.1.1 
> +-- semver@5.3.0 
> +-- source-map@0.1.32 
> +-- source-map-support@0.3.2 
> +-- split2@2.1.1 
> +-- string_decoder@1.0.3 
> +-- strip-ansi@0.3.0 
> +-- supports-color@0.2.0 
> +-- through2@2.0.3 
> +-- underscore@1.5.2 
> +-- util-deprecate@1.0.2 
> `-- xtend@4.0.1 
> npm WARN meteor-dev-bundle@0.0.0 No description
> npm WARN meteor-dev-bundle@0.0.0 No repository field.
> npm WARN meteor-dev-bundle@0.0.0 No license field.
>  ---> 8be208b48383
> Removing intermediate container e763df440f84
> Step 9 : WORKDIR ../../
>  ---> Running in a98eb90d44dd
>  ---> b5d79ed23a6f
> Removing intermediate container a98eb90d44dd
> Step 10 : EXPOSE 3000
>  ---> Running in cb6369afdb74
>  ---> 690f1df45519
> Removing intermediate container cb6369afdb74
> Step 11 : CMD node main.js
>  ---> Running in 009b3f8cb2d0
>  ---> 515fcdc668d9
> Removing intermediate container 009b3f8cb2d0
> Successfully built 515fcdc668d9
> ▲ Storing image
> ▲ Deploying image
> ▲ Container started
> Deployment complete!

@tomyo
Copy link
Author

tomyo commented Oct 12, 2017

...

@capi1O
Copy link

capi1O commented Nov 21, 2018

Any update on this issue ? I cannot find a way to install bcrypt on production...

@jkrup
Copy link
Owner

jkrup commented Oct 18, 2019

Deprecating in favor of meteor-hero.

@jkrup jkrup closed this as completed Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants