2016-03-03 162 views
0

我已經構建的應用程序離線工作,與npm start,但不工作heroku在heroku上部署的錯誤

生成日誌

-----> Node.js app detected 
-----> Creating runtime environment 

    NPM_CONFIG_LOGLEVEL=error 
    NPM_CONFIG_PRODUCTION=true 
    NODE_ENV=production 
    NODE_MODULES_CACHE=true 
-----> Installing binaries 
    engines.node (package.json): 4.2.3 
    engines.npm (package.json): 2.14.7 

    Downloading and installing node 4.2.3... 
    npm 2.14.7 already installed with node 
-----> Restoring cache 
    Skipping cache restore (new runtime signature) 
-----> Building dependencies 
    Pruning any extraneous modules 
    Installing node modules (package.json) 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/hiredis 
    > node-gyp rebuild 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/hiredis/build' 
    CC(target) Release/obj.target/hiredis-c/deps/hiredis/sds.o 
    CC(target) Release/obj.target/hiredis-c/deps/hiredis/read.o 
    AR(target) Release/obj.target/deps/hiredis-c.a 
    COPY Release/hiredis-c.a 
    CXX(target) Release/obj.target/hiredis/src/hiredis.o 
    CXX(target) Release/obj.target/hiredis/src/reader.o 
    SOLINK_MODULE(target) Release/obj.target/hiredis.node 
    COPY Release/hiredis.node 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/hiredis/build' 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/websocket-stream/node_modules/ws/node_modules/bufferutil 
    > node-gyp rebuild 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/websocket-stream/node_modules/ws/node_modules/bufferutil/build' 
    CXX(target) Release/obj.target/bufferutil/src/bufferutil.o 
    SOLINK_MODULE(target) Release/obj.target/bufferutil.node 
    COPY Release/bufferutil.node 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/websocket-stream/node_modules/ws/node_modules/bufferutil/build' 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/websocket-stream/node_modules/ws/node_modules/utf-8-validate 
    > node-gyp rebuild 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/websocket-stream/node_modules/ws/node_modules/utf-8-validate/build' 
    CXX(target) Release/obj.target/validation/src/validation.o 
    SOLINK_MODULE(target) Release/obj.target/validation.node 
    COPY Release/validation.node 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/websocket-stream/node_modules/ws/node_modules/utf-8-validate/build' 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/zmq 
    > node-gyp rebuild 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/zmq/build' 
    CXX(target) Release/obj.target/zmq/binding.o 
    ../binding.cc:28:17: fatal error: zmq.h: No such file or directory 
    #include <zmq.h> 
^
    compilation terminated. 
    make: *** [Release/obj.target/zmq/binding.o] Error 1 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/zmq/build' 
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2 
    gyp ERR! stack  at ChildProcess.onExit (/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
    gyp ERR! stack  at emitTwo (events.js:87:13) 
    gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
    gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
    gyp ERR! System Linux 3.13.0-77-generic 
    gyp ERR! command "/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/bin/node" "/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
    gyp ERR! cwd /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/zmq 
    gyp ERR! node -v v4.2.3 
    gyp ERR! node-gyp -v v3.0.3 
    gyp ERR! not ok 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/bunyan/node_modules/dtrace-provider 
    > node scripts/install.js 


    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq 
    > node-gyp rebuild 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq/build' 
    CXX(target) Release/obj.target/zmq/binding.o 
    ../binding.cc:28:17: fatal error: zmq.h: No such file or directory 
    #include <zmq.h> 
^
    compilation terminated. 
    make: *** [Release/obj.target/zmq/binding.o] Error 1 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq/build' 
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2 
    gyp ERR! stack  at ChildProcess.onExit (/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
    gyp ERR! stack  at emitTwo (events.js:87:13) 
    gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
    gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
    gyp ERR! System Linux 3.13.0-77-generic 
    gyp ERR! command "/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/bin/node" "/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
    gyp ERR! cwd /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/zmq 
    gyp ERR! node -v v4.2.3 
    gyp ERR! node-gyp -v v3.0.3 
    gyp ERR! not ok 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/buffertools 
    > node-gyp rebuild 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/buffertools/build' 
    CXX(target) Release/obj.target/buffertools/buffertools.o 
    SOLINK_MODULE(target) Release/obj.target/buffertools.node 
    COPY Release/buffertools.node 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/buffertools/build' 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/mongodb/node_modules/kerberos 
    > (node-gyp rebuild) || (exit 0) 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/mongodb/node_modules/kerberos/build' 
    CXX(target) Release/obj.target/kerberos/lib/kerberos.o 
    CXX(target) Release/obj.target/kerberos/lib/worker.o 
    CC(target) Release/obj.target/kerberos/lib/kerberosgss.o 
    ../lib/kerberosgss.c:36:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 
    #pragma clang diagnostic push 
^
    ../lib/kerberosgss.c:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 
    #pragma clang diagnostic ignored "-Wdeprecated-declarations" 
^
    ../lib/kerberosgss.c: In function ‘authenticate_gss_client_wrap’: 
    ../lib/kerberosgss.c:362:19: warning: variable ‘server_conf_flags’ set but not used [-Wunused-but-set-variable] 
    char buf[4096], server_conf_flags; 
^
    ../lib/kerberosgss.c: At top level: 
    ../lib/kerberosgss.c:930:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] 
    #pragma clang diagnostic pop 
^
    CC(target) Release/obj.target/kerberos/lib/base64.o 
    CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o 
    SOLINK_MODULE(target) Release/obj.target/kerberos.node 
    COPY Release/kerberos.node 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/mongodb/node_modules/kerberos/build' 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/fs-ext 
    > node-gyp configure build 

    make: Entering directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/fs-ext/build' 
    CXX(target) Release/obj.target/fs-ext/fs-ext.o 
    In file included from ../fs-ext.cc:27:0: 
    ../node_modules/nan/nan.h:324:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureHandleOrPersistent(const v8::Local<T>&)’ 
    NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) { 
^
    ../node_modules/nan/nan.h:319:17: error: ‘template<class T> v8::Handle<T> Nan::imp::NanEnsureHandleOrPersistent(v8::Handle<T>&)’ previously declared here 
    v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) { 
^
    ../node_modules/nan/nan.h:344:27: error: redefinition of ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(v8::Handle<T>&)’ 
    NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) { 
^
    ../node_modules/nan/nan.h:334:27: error: ‘template<class T> v8::Local<T> Nan::imp::NanEnsureLocal(const v8::Local<T>&)’ previously declared here 
    NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) { 
^
    ../node_modules/nan/nan.h:757:13: error: ‘node::smalloc’ has not been declared 
    , node::smalloc::FreeCallback callback 
^
    ../node_modules/nan/nan.h:757:35: error: expected ‘,’ or ‘...’ before ‘callback’ 
    , node::smalloc::FreeCallback callback 
^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’: 
    ../node_modules/nan/nan.h:761:50: error: ‘callback’ was not declared in this scope 
    v8::Isolate::GetCurrent(), data, length, callback, hint); 
^
    ../node_modules/nan/nan.h:761:60: error: ‘hint’ was not declared in this scope 
    v8::Isolate::GetCurrent(), data, length, callback, hint); 
^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’: 
    ../node_modules/nan/nan.h:768:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous 
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
^
    ../node_modules/nan/nan.h:768:67: note: candidates are: 
    In file included from ../node_modules/nan/nan.h:25:0, 
    from ../fs-ext.cc:27: 
    /app/.node-gyp/4.2.3/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match> 
    NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
^
    /app/.node-gyp/4.2.3/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ 
    /app/.node-gyp/4.2.3/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match> 
    NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
^
    /app/.node-gyp/4.2.3/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’ 
    In file included from ../fs-ext.cc:27:0: 
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’: 
    ../node_modules/nan/nan.h:772:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’ 
    return node::Buffer::New(v8::Isolate::GetCurrent(), size); 
^
    ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’: 
    ../node_modules/nan/nan.h:779:12: error: ‘Use’ is not a member of ‘node::Buffer’ 
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); 
^
    make: *** [Release/obj.target/fs-ext/fs-ext.o] Error 1 
    make: Leaving directory `/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/fs-ext/build' 
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2 
    gyp ERR! stack  at ChildProcess.onExit (/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
    gyp ERR! stack  at emitTwo (events.js:87:13) 
    gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
    gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
    gyp ERR! System Linux 3.13.0-77-generic 
    gyp ERR! command "/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/bin/node" "/tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" 
    gyp ERR! cwd /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/ascoltatori/node_modules/qlobber-fsq/node_modules/fs-ext 
    gyp ERR! node -v v4.2.3 
    gyp ERR! node-gyp -v v3.0.3 
    gyp ERR! not ok 

    > [email protected] install /tmp/build_53fdc0bcb9495ddaeba9fc11b5883afa/Mansoor-amin-MySalesmanApp-b437df7/node_modules/mors/node_modules/mosca/node_modules/leveldown 
    > prebuild --install 

    [email protected] node_modules/q 

    [email protected] node_modules/cors 
    └── [email protected] 

    [email protected] node_modules/angularfire 
    └── [email protected] 

    [email protected] node_modules/express 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    └── [email protected] ([email protected], [email protected]) 

    [email protected] node_modules/body-parser 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] ([email protected], [email protected]) 
    ├── [email protected] ([email protected]) 
    ├── [email protected] 
    └── [email protected] ([email protected], [email protected]) 

    [email protected] node_modules/firebase 
    └── [email protected] ([email protected]) 

    [email protected] node_modules/mongoose 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] ([email protected], [email protected], [email protected]) 
    └── [email protected] ([email protected], [email protected], [email protected]) 

    [email protected] node_modules/mors 
    ├── [email protected] 
    ├── [email protected] ([email protected]) 
    ├── [email protected] 
    └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
-----> Caching build 
    Clearing previous node cache 
    Saving 2 cacheDirectories (default): 
    - node_modules 
    - bower_components (nothing to cache) 
-----> Build succeeded! 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    ├── [email protected] 
    └── [email protected] 

-----> Discovering process types 
    Procfile declares types  -> (none) 
    Default types for buildpack -> web 
-----> Compressing... 
    Done: 23.6M 
-----> Launching... 
    Released v3 
    https://mysalesmanapp.herokuapp.com/ deployed to Heroku 

github上 https://github.com/Mansoor-amin/MySalesmanApp.git

Heroku的 https://mysalesmanapp.herokuapp.com/

+0

告訴我的結果:-t – num8er

回答

0

使用NODE_MODULES_CACHE=false配置設置。如果你能做到這一點,另一個選擇是刪除應用程序並使用該設置重新創建它。

+0

您是否安裝ZMQ Heroku的日誌?您可以嘗試使用[buildpack](https://github.com/VerdigrisTech/heroku-buildpack-zmq)和[multi buildpack](https://github.com/ddollar/heroku-buildpack-multi.git) 。如果仍然出現相同的錯誤,則可能需要檢查「LD_LIBRARY_PATH」和「PKG_CONFIG_PATH」env變量是否設置正確。 Buildpacks有時會混合使用環境變量,在'.buildpacks'中嘗試不同的順序,但主要是確保安裝腳本正確設置庫路徑。 –

0

我發現的主要應用之前在Heroku上安裝ZMQ的一個很好的方式,使zmq.h可在部署/編譯時間:

  1. 添加https://github.com/heroku/heroku-buildpack-apt爲buildpack。我將它添加到heroku/nodejs以上,不知道它是否有所作爲。
  2. 提交一個新的文件Aptfile到您的回購根與此內容: libzmq3-dbg libzmq3-dev libzmq3