Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 错误:使用Next.js在Heroku上生成EACCES_Node.js_Git_Heroku_Npm_Nextjs - Fatal编程技术网

Node.js 错误:使用Next.js在Heroku上生成EACCES

Node.js 错误:使用Next.js在Heroku上生成EACCES,node.js,git,heroku,npm,nextjs,Node.js,Git,Heroku,Npm,Nextjs,当我尝试将我的Next.js项目推送到Heroku时,出现以下错误。它在本地正常工作。此外,我之前的承诺对Heroku有效。我现在尝试将项目的新版本推送到Heroku,其中package.json没有更改,我得到以下错误: remote: Compressing source files... done. remote: Building source: remote: remote: -----> Node.js app detected remote: remote: -----&

当我尝试将我的Next.js项目推送到Heroku时,出现以下错误。它在本地正常工作。此外,我之前的承诺对Heroku有效。我现在尝试将项目的新版本推送到Heroku,其中package.json没有更改,我得到以下错误:

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:        > ws@0.4.31 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:        > ws@0.4.31 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:        > uglifyjs-webpack-plugin@0.4.6 postinstall /tmp/build_256cc24fd8631322ca4977031531f9d5/node_modules/uglifyjs-webpack-plugin
remote:        > node lib/post_install.js
remote:        
remote:        
remote:        > ...@1.0.0 postinstall /tmp/build_256cc24fd8631322ca4977031531f9d5
remote:        > npm run build
remote:        
remote:        
remote:        > ...@1.0.0 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! ...@1.0.0 build: `next build`
remote:        npm ERR! Exit status 1
remote:        npm ERR!
remote:        npm ERR! Failed at the ...@1.0.0 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! ...@1.0.0 postinstall: `npm run build`
remote:        npm ERR! Exit status 1
remote:        npm ERR!
remote:        npm ERR! Failed at the ...@1.0.0 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
remote:压缩源文件。。。完成。
远程:建筑源:
远程:
远程:-->Node.js应用程序检测到
远程:
远程:-->创建运行时环境
远程:
远程:NPM\u配置\u日志级别=错误
远程:NPM_CONFIG_PRODUCTION=true
远程:节点\u VERBOSE=false
远程:节点_ENV=生产
远程:节点\模块\缓存=真
远程:
远程:-->安装二进制文件
远程:engines.node(package.json):未指定
remote:engines.npm(package.json):未指定(使用默认值)
远程:
远程:正在解析节点版本6.x。。。
远程:下载和安装节点6.11.2。。。
远程:检测到package-lock.json:将npm默认为5.x.x版本
远程:引导npm 5.x.x(替换3.10.10)。。。
远程:已安装npm 5.4.0
远程:
远程:-->正在恢复缓存
远程:跳过缓存还原(新签名)
远程:
远程:-->生成依赖项
远程:安装节点模块(package.json+包锁)
远程:
远程:>ws@0.4.31安装/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws
远程:>(节点gyp rebuild 2>builderror.log)| |(退出0)
远程:
远程:make:输入目录“/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build”
远程:CXX(target)Release/obj.target/bufferutil/src/bufferutil.o
远程:bufferutil.target.mk:96:目标“Release/obj.target/bufferutil/src/bufferutil.o”的配方失败
远程:make:离开目录“/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build”
远程:
远程:>ws@0.4.31安装/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
远程:>(节点gyp rebuild 2>builderror.log)| |(退出0)
远程:
远程:make:输入目录“/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io客户端/node_模块/engine.io客户端/node_模块/ws/build”
远程:CXX(target)Release/obj.target/bufferutil/src/bufferutil.o
远程:bufferutil.target.mk:96:目标“Release/obj.target/bufferutil/src/bufferutil.o”的配方失败
远程:make:离开目录“/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io客户端/node_模块/engine.io客户端/node_模块/ws/build”
远程:
远程:>uglifyjs网页包-plugin@0.4.6postinstall/tmp/build_256CC24FD86312CA497703131F9D5/node_模块/uglifyjs网页包插件
远程:>节点lib/post_install.js
远程:
远程:
远程:>…@1.0.0安装后/tmp/build_256cc24fd86312ca497703131f9d5
远程:>npm运行构建
远程:
远程:
远程:>…@1.0.0构建/tmp/build_256CC24FD86312CA497703131F9D5
远程:>下一次生成
远程:
远程:内部/子进程。js:319
远程:抛出errnoException(err,‘spawn’);
远程:^
远程:
远程:错误:生成EACCES
远程:在导出时。\u errnoException(util.js:1020:11)
远程:在ChildProcess.spawn(internal/child_process.js:319:11)
远程:在Object.exports.spawn(child_process.js:369:9)
远程:在spawn(/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/cross-spawn/index.js:17:18)
远程:在启动过程中(/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/next/dist/bin/next:69:36)
远程:在对象上。(/tmp/build_256cc24fd86312ca497703131f9d5/node_modules/next/dist/bin/next:90:12)
远程:在模块上编译(Module.js:570:32)
远程:在Object.Module.\u extensions..js(Module.js:579:10)
远程:at Module.load(Module.js:487:32)
远程:在tryModuleLoad上(module.js:446:12)
远程:npm错误!代码失效循环
远程:npm错误!错误1
远程:npm错误@1.0.0版本:`下一个版本`
远程:npm错误!退出状态1
远程:npm错误!
远程:npm错误!在…@1.0.0生成脚本中失败。
远程:npm错误!这可能不是npm的问题。上面可能还有其他日志输出。
远程:
远程:npm错误!此运行的完整日志可在以下位置找到:
远程:npm错误/app/.npm/_logs/2017-09-02T02_28_44_026Z-debug.log
远程:npm错误!代码失效循环
远程:npm错误!错误1
远程:npm错误@1.0.0安装后:`npm运行生成`
远程:npm错误!退出状态1
远程:npm错误!
远程:npm错误!在…@1.0.0安装后脚本中失败。
远程:npm错误!这可能不是npm的问题。上面可能还有其他日志输出。
远程:
远程:npm错误!此运行的完整日志可在以下位置找到:
远程:npm错误/app/.npm/_logs/2017-09-02T02_28_44_119Z-debug.log
远程:
远程:-->生成失败