Date
1 - 5 of 5
My nodejs application can't work if the version nodejs buildpack >= v1.5.9
Sam Dai
Hello,
I have a nodejs application, it can be deployed and started in CF if the version nodejs buildpack <v 1.5.9, the version of node and npm in package.json of my nodejs application is as below: , "engines" : { "node" : "~0.12.7", "npm" : "~2.11.3" } When I deployed my nodejs application to nodejs v1.5.9, there is the following error, do I need change something? Downloading nodejs_buildpack... Downloaded nodejs_buildpack (60.7M) Creating container Successfully created container Downloading app package... Downloaded app package (4.8M) Staging... -------> Buildpack version 1.5.11 -----> Creating runtime environment NPM_CONFIG_LOGLEVEL=error NPM_CONFIG_PRODUCTION=true NODE_ENV=production NODE_MODULES_CACHE=true -----> Installing binaries engines.node (package.json): ~0.12.7 engines.npm (package.json): ~2.11.3 Downloading and installing node 0.12.13... Downloaded [file:///tmp/buildpacks/d9e57be809c47eef0c67cf7e2b84bbbe/dependencies/https___pivotal-buildpacks.s3.amazonaws.com_concourse-binaries_node_node-0.12.13-linux-x64.tgz] Resolving npm version ~2.11.3 via semver.io... Downloading and installing npm 2.11.3 (replacing version 2.15.0)... -----> Restoring cache Skipping cache restore (new runtime signature) -----> Building dependencies Prebuild detected (node_modules already exists) Rebuilding any native modules > bson(a)0.2.2 install /tmp/app/node_modules/mongoskin/node_modules/mongodb/node_modules/bson > (node-gyp rebuild 2> builderror.log) || (exit 0) > kerberos(a)0.0.3 install /tmp/app/node_modules/mongoskin/node_modules/mongodb/node_modules/kerberos > (node-gyp rebuild 2> builderror.log) || (exit 0) > dtrace-provider(a)0.2.8 install /tmp/app/node_modules/ldapjs/node_modules/dtrace-provider > node-gyp rebuild gyp: /tmp/app/.heroku/node/common.gypi not found (cwd: /tmp/app/node_modules/ldapjs/node_modules/dtrace-provider) while reading includes of binding.gyp while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/tmp/app/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1078:12) gyp ERR! System Linux 3.19.0-28-generic gyp ERR! command "node" "/tmp/app/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /tmp/app/node_modules/ldapjs/node_modules/dtrace-provider gyp ERR! node -v v0.12.13 gyp ERR! node-gyp -v v2.0.1 gyp ERR! not ok npm ERR! Linux 3.19.0-28-generic npm ERR! argv "node" "/tmp/app/.heroku/node/bin/npm" "rebuild" "--nodedir=/tmp/app/.heroku/node" npm ERR! node v0.12.13 npm ERR! npm v2.11.3 npm ERR! code ELIFECYCLE npm ERR! dtrace-provider(a)0.2.8 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the dtrace-provider(a)0.2.8 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the dtrace-provider package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls dtrace-provider npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /tmp/app/npm-debug.log -----> Build failed We're sorry this build is failing! You can troubleshoot common issues here: https://devcenter.heroku.com/articles/troubleshooting-node-deploys Some possible problems: - node_modules checked into source control https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git Love, Heroku |
|
Daniel Mikusa
This isn't really a problem with the build pack. It's a problem with
toggle quoted message
Show quoted text
compiling one of the native modules that you are using ` dtrace-provider(a)0.2.8`. Not sure why that's failing. There's some info in the output from NPM below, which might help to someone more familiar with that module. From a CF perspective you could confirm it's the problem if you remove that package from your application and push again. Dan On Sat, Apr 30, 2016 at 9:45 PM, Sam Dai <sam.dai(a)servicemax.com> wrote:
Hello, |
|
Sam Dai
Have resolved this issue, the solution is change the npm version of package.json from ~2.11.3 to ~2.15.0 .
Change ``` , "engines" : { "node" : "~0.12.7", "npm" : "~2.11.3" } ``` into: ``` , "engines" : { "node" : "~0.12.7", "npm" : "~2.15.0" } ``` |
|
John Shahid
Glad to here you got your app to deploy. Any idea why you had to update the
toggle quoted message
Show quoted text
version of npm ? Did you see anything in the changelog that is interesting ? On Sat, Apr 30, 2016 at 9:45 PM Sam Dai <sam.dai(a)servicemax.com> wrote:
Hello, |
|
Sam Dai
I have checked the pull request of nodejs buildpack git project, but haven't found any clue, so I guess the version of my npm might be old, upgrade to new version, and it works
|
|