Error: spawn EACCES on Heroku with Next.js

342 views Asked by At

I'm getting the following error when I try to push my Next.js project to Heroku. It works correctly locally. Additionally my previous commit worked on Heroku. I'm now trying to push a new version of the project to Heroku, where the package.json hasn't changed and I get the following error:

remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
remote: 
remote: -----> Creating runtime environment
remote:        
remote:        NPM_CONFIG_LOGLEVEL=error
remote:        NPM_CONFIG_PRODUCTION=true
remote:        NODE_VERBOSE=false
remote:        NODE_ENV=production
remote:        NODE_MODULES_CACHE=true
remote: 
remote: -----> Installing binaries
remote:        engines.node (package.json):  unspecified
remote:        engines.npm (package.json):   unspecified (use default)
remote:        
remote:        Resolving node version 6.x...
remote:        Downloading and installing node 6.11.2...
remote:        Detected package-lock.json: defaulting npm to version 5.x.x
remote:        Bootstrapping npm 5.x.x (replacing 3.10.10)...
remote:        npm 5.4.0 installed
remote: 
remote: -----> Restoring cache
remote:        Skipping cache restore (new-signature)
remote: 
remote: -----> Building dependencies
remote:        Installing node modules (package.json + package-lock)
remote:        
remote:        > [email protected] install /tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws
remote:        > (node-gyp rebuild 2> builderror.log) || (exit 0)
remote:        
remote:        make: Entering directory '/tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
remote:        CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
remote:        bufferutil.target.mk:96: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed
remote:        make: Leaving directory '/tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
remote:        
remote:        > [email protected] install /tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
remote:        > (node-gyp rebuild 2> builderror.log) || (exit 0)
remote:        
remote:        make: Entering directory '/tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
remote:        CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
remote:        bufferutil.target.mk:96: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed
remote:        make: Leaving directory '/tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
remote:        
remote:        > [email protected] postinstall /tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/uglifyjs-webpack-plugin
remote:        > node lib/post_install.js
remote:        
remote:        
remote:        > [email protected] postinstall /tmp/build_256cc24fd8631322ca4977031531f9d5
remote:        > npm run build
remote:        
remote:        
remote:        > [email protected] build /tmp/build_256cc24fd8631322ca4977031531f9d5
remote:        > next build
remote:        
remote:        internal/child_process.js:319
remote:        throw errnoException(err, 'spawn');
remote:        ^
remote:        
remote:        Error: spawn EACCES
remote:        at exports._errnoException (util.js:1020:11)
remote:        at ChildProcess.spawn (internal/child_process.js:319:11)
remote:        at Object.exports.spawn (child_process.js:369:9)
remote:        at spawn (/tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/cross-spawn/index.js:17:18)
remote:        at startProcess (/tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/next/dist/bin/next:69:36)
remote:        at Object.<anonymous> (/tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/next/dist/bin/next:90:12)
remote:        at Module._compile (module.js:570:32)
remote:        at Object.Module._extensions..js (module.js:579:10)
remote:        at Module.load (module.js:487:32)
remote:        at tryModuleLoad (module.js:446:12)
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno 1
remote:        npm ERR! [email protected] build: `next build`
remote:        npm ERR! Exit status 1
remote:        npm ERR!
remote:        npm ERR! Failed at the [email protected] build script.
remote:        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:        
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /app/.npm/_logs/2017-09-02T02_28_44_026Z-debug.log
remote:        npm ERR! code ELIFECYCLE
remote:        npm ERR! errno 1
remote:        npm ERR! [email protected] postinstall: `npm run build`
remote:        npm ERR! Exit status 1
remote:        npm ERR!
remote:        npm ERR! Failed at the [email protected] postinstall script.
remote:        npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:        
remote:        npm ERR! A complete log of this run can be found in:
remote:        npm ERR!     /app/.npm/_logs/2017-09-02T02_28_44_119Z-debug.log
remote: 
remote: -----> Build failed
0

There are 0 answers