mapbox / mapbox/node-pre-gyp

heroku node deployment(react-boilerplate) sh: 1: node-pre-gyp: not found error

Open
#423 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

I'm getting error when deploying react-boilerplate on heroku with feathers, nodejs, mongodb, react. I specified up to date versions in package.json, and tried building with both npm and yarn but both fail. I appreciate your help!

"engines": {
"npm": ">=6.4.1",
"node": ">=v8.12.0",
"yarn": ">=1.10.1"
},

trial 1:
install with npm. error: sh: 1: node-pre-gyp: not found

NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
YARN_PRODUCTION=false
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true

-----> Installing binaries
engines.node (package.json): >=v8.12.0
engines.npm (package.json): >=6.4.1

Resolving node version >=v8.12.0...
Downloading and installing node 10.12.0...
Bootstrapping npm >=6.4.1 (replacing 6.4.1)...
npm >=6.4.1 installed
Resolving yarn version >=1.10.1...
Downloading and installing yarn (1.12.0)...
Installed yarn 1.12.0

> grpc@1.15.1 install /tmp/build_e7799f363b624e57eda6680a757c4fd4/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

sh: 1: node-pre-gyp: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! grpc@1.15.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the grpc@1.15.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

trial 2:
install with yarn. error: Error: spawn webpack ENOENT

NPM_CONFIG_LOGLEVEL=error
YARN_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true

-----> Installing binaries
engines.node (package.json): >=v8.12.0
engines.npm (package.json): >=6.4.1
engines.yarn (package.json): >=1.10.1

Resolving node version >=v8.12.0...
Downloading and installing node 10.12.0...
Bootstrapping npm >=6.4.1 (replacing 6.4.1)...
npm >=6.4.1 installed
Resolving yarn version >=1.10.1...
Downloading and installing yarn (1.12.0)...
Installed yarn 1.12.0


> seunghunlee-software@3.6.0 build /tmp/build_edb00e4a7279e6636f35f9ea79a9d0f8
> cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout

events.js:167
throw er; // Unhandled 'error' event
^
Error: spawn webpack ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
at onErrorNT (internal/child_process.js:407:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:744:11)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:238:12)
at onErrorNT (internal/child_process.js:407:16)
[... lines matching original stack trace ...]
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Heroku deployment using the reported package.json engine settings and compare the npm and Yarn logs. Investigate the grpc install command reporting node-pre-gyp as missing and the production build reporting webpack as missing. Done means the deployment completes successfully with the supported dependency installation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, javascript, nodejs, webpack
Domain
build-system, devops, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.