最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

建立从Heroku的CLI或github上的错误。不能部署新内容

IT培训 admin 2浏览 0评论

建立从Heroku的CLI或github上的错误。不能部署新内容

我一直在使用Heroku的部署网站。到目前为止,一切都很顺利。不使用它几个月后,我决定来更新它,而我发现自己面临着一个错误我无法理解。

我已经尝试了我所有的依赖更新要么最后建议,最后释放。我已经更新的NodeJS,新公共管理和更新包文件。所有没有成功。所有我想要的是能够更新我目前的应用程序我有内容。

下面你可以看到我的构建日志。

   -----> Node.js app detected

   -----> Creating runtime environment

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

   -----> Installing binaries
   engines.node (package.json):  unspecified
   engines.npm (package.json):   unspecified (use default)

   Resolving node version 10.x...
   Downloading and installing node 10.15.1...
   Using default npm version: 6.4.1

   -----> Restoring cache
   Cached directories were not restored due to a change in version of node, npm, yarn or stack
   Module installation may take longer for this build

   -----> Building dependencies
   Installing node modules (package.json + package-lock)

   > [email protected] install /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   > node-pre-gyp install --fallback-to-build

   node-pre-gyp ERR! Tried to download(404): .bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v64-linux-x64.tar.gz 
   node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
   node-pre-gyp ERR! Tried to download(undefined): .bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v64-linux-x64.tar.gz 
   node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
   make: Entering directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
   make: Entering directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
     CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
     CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
   sed: can't read ./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw: No such file or directory
     CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
   rm: cannot remove './Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw': No such file or directory
   bcrypt_lib.target.mk:103: recipe for target 'Release/obj.target/bcrypt_lib/src/blowfish.o' failed
   make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
   make: Leaving directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
   gyp ERR! build error 
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
   gyp ERR! System Linux 4.4.0-1031-aws
   gyp ERR! command "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node" "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding"
   gyp ERR! cwd /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   gyp ERR! node -v v10.15.1
   gyp ERR! node-gyp -v v3.8.0
   gyp ERR! not ok 
   node-pre-gyp ERR! build error 
   node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node /tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding' (1)
   node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
   node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
   node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
   node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
   node-pre-gyp ERR! System Linux 4.4.0-1031-aws
   node-pre-gyp ERR! command "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node" "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
   node-pre-gyp ERR! cwd /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   node-pre-gyp ERR! node -v v10.15.1
   node-pre-gyp ERR! node-pre-gyp -v v0.6.36
   node-pre-gyp ERR! not ok 
   Failed to execute '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node /tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding' (1)
   ../src/bcrypt: In function ‘void encode_salt(char*, u_int8_t*, u_int16_t, u_int8_t)’:
   ../src/bcrypt:132:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
    encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr)
    ^~~~~~~~~~~
   In file included from /usr/include/stdio.h:862:0,
                    from ../src/bcrypt:48:
   /usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
           __bos (__s), __fmt, __va_arg_pack ());
                                               ^
   ../src/bcrypt: In function ‘void bcrypt(const char*, const char*, char*)’:
   ../src/bcrypt:165:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
    bcrypt(const char *key, const char *salt, char *encrypted)
    ^~~~~~
   In file included from /usr/include/stdio.h:862:0,
                    from ../src/bcrypt:48:
   /usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
           __bos (__s), __fmt, __va_arg_pack ());
                                               ^
     CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
   ../src/bcrypt_node:1:10: fatal error: nan.h: No such file or directory
    #include <nan.h>
             ^~~~~~~
   compilation terminated.
   bcrypt_lib.target.mk:103: recipe for target 'Release/obj.target/bcrypt_lib/src/bcrypt_node.o' failed
   make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
   make: Leaving directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
   gyp ERR! build error 
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
   gyp ERR! System Linux 4.4.0-1031-aws
   gyp ERR! command "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node" "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding"
   gyp ERR! cwd /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   gyp ERR! node -v v10.15.1
   gyp ERR! node-gyp -v v3.8.0
   gyp ERR! not ok 
   npm ERR! code ELIFECYCLE
   npm ERR! errno 1
   npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
   npm ERR! Exit status 1
   npm ERR! 
   npm ERR! Failed at the [email protected] install script.
   npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

   npm ERR! A complete log of this run can be found in:
   npm ERR!     /tmp/npmcache.X8NUf/_logs/2019-02-08T12_13_11_380Z-debug.log
   -----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   

   Some possible problems:

   - Node version not specified in package.json
     

   Love,
   Heroku

   !     Push rejected, failed to compile Node.js app.
   !     Push failed
回答如下:

由于您使用的Node.js 10.15.1,你应该看看这个here的版本的兼容性。

正如回购指出...

节点GYP只适用于节点的稳定/发布的版本。由于bcrypt模块使用节点GYP构建和安装你需要节点的稳定版本使用bcrypt。

所以,你要么需要切换到node.js的8 *到bcrypt 1.0.3使用或更新您的bcrypt为> = 3。

建立从Heroku的CLI或github上的错误。不能部署新内容

我一直在使用Heroku的部署网站。到目前为止,一切都很顺利。不使用它几个月后,我决定来更新它,而我发现自己面临着一个错误我无法理解。

我已经尝试了我所有的依赖更新要么最后建议,最后释放。我已经更新的NodeJS,新公共管理和更新包文件。所有没有成功。所有我想要的是能够更新我目前的应用程序我有内容。

下面你可以看到我的构建日志。

   -----> Node.js app detected

   -----> Creating runtime environment

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

   -----> Installing binaries
   engines.node (package.json):  unspecified
   engines.npm (package.json):   unspecified (use default)

   Resolving node version 10.x...
   Downloading and installing node 10.15.1...
   Using default npm version: 6.4.1

   -----> Restoring cache
   Cached directories were not restored due to a change in version of node, npm, yarn or stack
   Module installation may take longer for this build

   -----> Building dependencies
   Installing node modules (package.json + package-lock)

   > [email protected] install /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   > node-pre-gyp install --fallback-to-build

   node-pre-gyp ERR! Tried to download(404): .bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v64-linux-x64.tar.gz 
   node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
   node-pre-gyp ERR! Tried to download(undefined): .bcrypt.js/releases/download/v1.0.3/bcrypt_lib-v1.0.3-node-v64-linux-x64.tar.gz 
   node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI) (falling back to source compile with node-gyp) 
   make: Entering directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
   make: Entering directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
     CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
     CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
   sed: can't read ./Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw: No such file or directory
     CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
   rm: cannot remove './Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d.raw': No such file or directory
   bcrypt_lib.target.mk:103: recipe for target 'Release/obj.target/bcrypt_lib/src/blowfish.o' failed
   make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 1
   make: Leaving directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
   gyp ERR! build error 
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
   gyp ERR! System Linux 4.4.0-1031-aws
   gyp ERR! command "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node" "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding"
   gyp ERR! cwd /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   gyp ERR! node -v v10.15.1
   gyp ERR! node-gyp -v v3.8.0
   gyp ERR! not ok 
   node-pre-gyp ERR! build error 
   node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node /tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding' (1)
   node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
   node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
   node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
   node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
   node-pre-gyp ERR! System Linux 4.4.0-1031-aws
   node-pre-gyp ERR! command "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node" "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
   node-pre-gyp ERR! cwd /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   node-pre-gyp ERR! node -v v10.15.1
   node-pre-gyp ERR! node-pre-gyp -v v0.6.36
   node-pre-gyp ERR! not ok 
   Failed to execute '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node /tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding' (1)
   ../src/bcrypt: In function ‘void encode_salt(char*, u_int8_t*, u_int16_t, u_int8_t)’:
   ../src/bcrypt:132:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
    encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, u_int8_t logr)
    ^~~~~~~~~~~
   In file included from /usr/include/stdio.h:862:0,
                    from ../src/bcrypt:48:
   /usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
           __bos (__s), __fmt, __va_arg_pack ());
                                               ^
   ../src/bcrypt: In function ‘void bcrypt(const char*, const char*, char*)’:
   ../src/bcrypt:165:1: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
    bcrypt(const char *key, const char *salt, char *encrypted)
    ^~~~~~
   In file included from /usr/include/stdio.h:862:0,
                    from ../src/bcrypt:48:
   /usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
           __bos (__s), __fmt, __va_arg_pack ());
                                               ^
     CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
   ../src/bcrypt_node:1:10: fatal error: nan.h: No such file or directory
    #include <nan.h>
             ^~~~~~~
   compilation terminated.
   bcrypt_lib.target.mk:103: recipe for target 'Release/obj.target/bcrypt_lib/src/bcrypt_node.o' failed
   make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
   make: Leaving directory '/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/build'
   gyp ERR! build error 
   gyp ERR! stack Error: `make` failed with exit code: 2
   gyp ERR! stack     at ChildProcess.onExit (/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
   gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
   gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
   gyp ERR! System Linux 4.4.0-1031-aws
   gyp ERR! command "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/bin/node" "/tmp/build_7a23228fc603a8f673be221b4d53bbc2/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt/lib/binding"
   gyp ERR! cwd /tmp/build_7a23228fc603a8f673be221b4d53bbc2/node_modules/bcrypt
   gyp ERR! node -v v10.15.1
   gyp ERR! node-gyp -v v3.8.0
   gyp ERR! not ok 
   npm ERR! code ELIFECYCLE
   npm ERR! errno 1
   npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
   npm ERR! Exit status 1
   npm ERR! 
   npm ERR! Failed at the [email protected] install script.
   npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

   npm ERR! A complete log of this run can be found in:
   npm ERR!     /tmp/npmcache.X8NUf/_logs/2019-02-08T12_13_11_380Z-debug.log
   -----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   

   Some possible problems:

   - Node version not specified in package.json
     

   Love,
   Heroku

   !     Push rejected, failed to compile Node.js app.
   !     Push failed
回答如下:

由于您使用的Node.js 10.15.1,你应该看看这个here的版本的兼容性。

正如回购指出...

节点GYP只适用于节点的稳定/发布的版本。由于bcrypt模块使用节点GYP构建和安装你需要节点的稳定版本使用bcrypt。

所以,你要么需要切换到node.js的8 *到bcrypt 1.0.3使用或更新您的bcrypt为> = 3。

发布评论

评论列表 (0)

  1. 暂无评论