2015-09-24 4 views
9

Sorry, wenn dies zuvor gefragt/beantwortet wurde. Ähnliche Fragen, die ich über Google fand, hatten entweder offene Tickets, oder es wurde vorgeschlagen, Abhängigkeiten herunterzustufen. Ich bin unklar, warum der Build fehlschlägt, wenn es auf meinem lokalen Rechner ordnungsgemäß funktioniert.Heroku Push kann nicht kompiliert werden. Fehler zeigt auf Node-Sass. Mögliche Abhängigkeitskonflikt, Protokoll enthalten

Vielen Dank für Ihre Hilfe!

Counting objects: 28, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (26/26), done. 
Writing objects: 100% (28/28), 2.72 KiB | 0 bytes/s, done. 
Total 28 (delta 19), reused 0 (delta 0) 
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_ENV=production 
remote:  NODE_MODULES_CACHE=true 
remote: 
remote: -----> Installing binaries 
remote:  engines.node (package.json): 4.1.1 
remote:  engines.npm (package.json): 2.14.4 
remote: 
remote:  Downloading and installing node 4.1.1... 
remote:  npm 2.14.4 already installed with node 
remote: 
remote: -----> Restoring cache 
remote:  Skipping cache (new runtime signature) 
remote: 
remote: -----> Building dependencies 
remote:  Pruning any extraneous modules 
remote:  Installing node modules (package.json) 
remote: 
remote:  > [email protected] install /tmp/build_506a4990caa900fce789184be89dc03b/node_modules/gulp-sass/node_modules/node-sass 
remote:  > node build.js 
remote: 
remote:  (node) child_process: options.customFds option is deprecated. Use options.stdio instead. 
remote:  make: Entering directory `/tmp/build_506a4990caa900fce789184be89dc03b/node_modules/gulp-sass/node_modules/node-sass/build' 
remote:   CXX(target) Release/obj.target/binding/binding.o 
remote:  In file included from ../binding.cpp:1:0: 
remote:  ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Signature> NanNew(v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*)’: 
remote:  ../node_modules/nan/nan.h:189:78: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, v8::Handle<v8::FunctionTemplate>&, int&, v8::Handle<v8::FunctionTemplate>*&)’ 
remote:    return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv); 
remote:                     ^
remote:  ../node_modules/nan/nan.h:189:78: note: candidate is: 
remote:  In file included from /app/.node-gyp/4.1.1/include/node/node.h:42:0, 
remote:       from ../node_modules/nan/nan.h:23, 
remote:       from ../binding.cpp:1: 
remote:  /app/.node-gyp/4.1.1/include/node/v8.h:4675:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>) 
remote:   static Local<Signature> New(
remote:         ^
remote:  /app/.node-gyp/4.1.1/include/node/v8.h:4675:27: note: candidate expects 2 arguments, 4 provided 
remote:  In file included from ../binding.cpp:1:0: 
remote:  ../node_modules/nan/nan.h: At global scope: 
remote:  ../node_modules/nan/nan.h:271:3: error: redefinition of ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Local<v8::String>]’ 
remote:   NanNew<v8::StringObject, v8::Handle<v8::String> >(
remote:   ^
remote:  ../node_modules/nan/nan.h:264:3: error: ‘v8::Local<T> NanNew(P) [with T = v8::StringObject; P = v8::Local<v8::String>]’ previously declared here 
remote:   NanNew<v8::StringObject, v8::Local<v8::String> >(
remote:   ^
remote:  ../node_modules/nan/nan.h:289:36: error: redefinition of ‘template<class T> v8::Local<v8::RegExp> NanNew(v8::Local<v8::String>, v8::RegExp::Flags)’ 
remote:   NAN_INLINE v8::Local<v8::RegExp> NanNew(
remote:           ^
remote:  ../node_modules/nan/nan.h:283:36: error: ‘template<class T> v8::Local<v8::RegExp> NanNew(v8::Handle<v8::String>, v8::RegExp::Flags)’ previously declared here 
remote:   NAN_INLINE v8::Local<v8::RegExp> NanNew(
remote:           ^
remote:  ../node_modules/nan/nan.h:301:36: error: redefinition of ‘template<class T, class P> v8::Local<v8::RegExp> NanNew(v8::Local<v8::String>, v8::RegExp::Flags)’ 
remote:   NAN_INLINE v8::Local<v8::RegExp> NanNew(
remote:           ^
remote:  ../node_modules/nan/nan.h:295:36: error: ‘template<class T, class P> v8::Local<v8::RegExp> NanNew(v8::Handle<v8::String>, v8::RegExp::Flags)’ previously declared here 
remote:   NAN_INLINE v8::Local<v8::RegExp> NanNew(
remote:           ^
remote:  ../node_modules/nan/nan.h:481:19: error: ‘NanNew’ declared as an ‘inline’ variable 
remote:    v8::String::ExternalAsciiStringResource *resource) { 
remote:       ^
remote:  ../node_modules/nan/nan.h:481:19: warning: ‘always_inline’ attribute ignored [-Wattributes] 
remote:  ../node_modules/nan/nan.h:481:19: error: ‘v8::Local<v8::String> NanNew’ redeclared as different kind of symbol 
remote:  ../node_modules/nan/nan.h:475:36: error: previous declaration of ‘v8::Local<v8::String> NanNew(v8::String::ExternalStringResource*)’ 
remote:   NAN_INLINE v8::Local<v8::String> NanNew(
remote:           ^
remote:  ../node_modules/nan/nan.h:481:7: error: ‘ExternalAsciiStringResource’ is not a member of ‘v8::String’ 
remote:    v8::String::ExternalAsciiStringResource *resource) { 
remote:    ^
remote:  ../node_modules/nan/nan.h:481:48: error: ‘resource’ was not declared in this scope 
remote:    v8::String::ExternalAsciiStringResource *resource) { 
remote:              ^
remote:  ../node_modules/nan/nan.h:495:27: error: redefinition of ‘template<class T> v8::Local<T> _NanEscapeScopeHelper(v8::Local<T>)’ 
remote:   NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Local<T> val) { 
remote:         ^
remote:  ../node_modules/nan/nan.h:490:27: error: ‘template<class T> v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T>)’ previously declared here 
remote:   NAN_INLINE v8::Local<T> _NanEscapeScopeHelper(v8::Handle<T> val) { 
remote:         ^
remote:  ../node_modules/nan/nan.h:755:13: error: ‘node::smalloc’ has not been declared 
remote:    , node::smalloc::FreeCallback callback 
remote:     ^
remote:  ../node_modules/nan/nan.h:755:35: error: expected ‘,’ or ‘...’ before ‘callback’ 
remote:    , node::smalloc::FreeCallback callback 
remote:           ^
remote:  ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’: 
remote:  ../node_modules/nan/nan.h:759:50: error: ‘callback’ was not declared in this scope 
remote:     v8::Isolate::GetCurrent(), data, length, callback, hint); 
remote:              ^
remote:  ../node_modules/nan/nan.h:759:60: error: ‘hint’ was not declared in this scope 
remote:     v8::Isolate::GetCurrent(), data, length, callback, hint); 
remote:                 ^
remote:  ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’: 
remote:  ../node_modules/nan/nan.h:766:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous 
remote:    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); 
remote:                   ^
remote:  ../node_modules/nan/nan.h:766:67: note: candidates are: 
remote:  In file included from ../node_modules/nan/nan.h:24:0, 
remote:       from ../binding.cpp:1: 
remote:  /app/.node-gyp/4.1.1/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> 
remote:   NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
remote:            ^
remote:  /app/.node-gyp/4.1.1/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ 
remote:  /app/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match> 
remote:   NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, 
remote:            ^
remote:  /app/.node-gyp/4.1.1/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’ 
remote:  In file included from ../binding.cpp:1:0: 
remote:  ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’: 
remote:  ../node_modules/nan/nan.h:770:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’ 
remote:    return node::Buffer::New(v8::Isolate::GetCurrent(), size); 
remote:                 ^
remote:  ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’: 
remote:  ../node_modules/nan/nan.h:777:12: error: ‘Use’ is not a member of ‘node::Buffer’ 
remote:    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); 
remote:     ^
remote:  ../node_modules/nan/nan.h: In function ‘bool _NanGetExternalParts(v8::Handle<v8::Value>, const char**, size_t*)’: 
remote:  ../node_modules/nan/nan.h:2103:12: error: ‘class v8::String’ has no member named ‘IsExternalAscii’ 
remote:   if (str->IsExternalAscii()) { 
remote:     ^
remote:  ../node_modules/nan/nan.h:2104:11: error: ‘ExternalAsciiStringResource’ in ‘class v8::String’ does not name a type 
remote:    const v8::String::ExternalAsciiStringResource* ext; 
remote:     ^
remote:  ../node_modules/nan/nan.h:2105:5: error: ‘ext’ was not declared in this scope 
remote:    ext = str->GetExternalAsciiStringResource(); 
remote:   ^
remote:  ../node_modules/nan/nan.h:2105:16: error: ‘class v8::String’ has no member named ‘GetExternalAsciiStringResource’ 
remote:    ext = str->GetExternalAsciiStringResource(); 
remote:      ^
remote:  ../binding.cpp: In function ‘void MakeCallback(uv_work_t*)’: 
remote:  ../binding.cpp:138:35: warning: ‘void node::FatalException(const v8::TryCatch&)’ is deprecated (declared at /app/.node-gyp/4.1.1/include/node/node.h:282): Use FatalException(isolate, ...) [-Wdeprecated-declarations] 
remote:    node::FatalException(try_catch); 
remote:           ^
remote:  make: *** [Release/obj.target/binding/binding.o] Error 1 
remote:  make: Leaving directory `/tmp/build_506a4990caa900fce789184be89dc03b/node_modules/gulp-sass/node_modules/node-sass/build' 
remote:  gyp ERR! build error 
remote:  gyp ERR! stack Error: `make` failed with exit code: 2 
remote:  gyp ERR! stack  at ChildProcess.onExit (/tmp/build_506a4990caa900fce789184be89dc03b/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23) 
remote:  gyp ERR! stack  at emitTwo (events.js:87:13) 
remote:  gyp ERR! stack  at ChildProcess.emit (events.js:172:7) 
remote:  gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) 
remote:  gyp ERR! System Linux 3.13.0-61-generic 
remote:  gyp ERR! command "/tmp/build_506a4990caa900fce789184be89dc03b/.heroku/node/bin/node" "/tmp/build_506a4990caa900fce789184be89dc03b/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
remote:  gyp ERR! cwd /tmp/build_506a4990caa900fce789184be89dc03b/node_modules/gulp-sass/node_modules/node-sass 
remote:  gyp ERR! node -v v4.1.1 
remote:  gyp ERR! node-gyp -v v3.0.3 
remote:  gyp ERR! not ok 
remote:  Build failed 
remote:  npm ERR! Linux 3.13.0-61-generic 
remote:  npm ERR! argv "/tmp/build_506a4990caa900fce789184be89dc03b/.heroku/node/bin/node" "/tmp/build_506a4990caa900fce789184be89dc03b/.heroku/node/bin/npm" "install" "--unsafe-perm" "--userconfig" "/tmp/build_506a4990caa900fce789184be89dc03b/.npmrc" 
remote:  npm ERR! node v4.1.1 
remote:  npm ERR! npm v2.14.4 
remote:  npm ERR! code ELIFECYCLE 
remote: 
remote:  npm ERR! [email protected] install: `node build.js` 
remote:  npm ERR! Exit status 1 
remote:  npm ERR! 
remote:  npm ERR! Failed at the [email protected] install script 'node build.js'. 
remote:  npm ERR! This is most likely a problem with the node-sass package, 
remote:  npm ERR! not with npm itself. 
remote:  npm ERR! Tell the author that this fails on your system: 
remote:  npm ERR!  node build.js 
remote:  npm ERR! You can get their info via: 
remote:  npm ERR!  npm owner ls node-sass 
remote:  npm ERR! There is likely additional logging output above. 
remote: 
remote:  npm ERR! Please include the following file with any support request: 
remote:  npm ERR!  /tmp/build_506a4990caa900fce789184be89dc03b/npm-debug.log 
remote: 
remote: -----> Build failed 
remote: 
remote:  We're sorry this build is failing! You can troubleshoot common issues here: 
remote:  https://devcenter.heroku.com/articles/troubleshooting-node-deploys 
remote: 
remote:  If you're stuck, please submit a ticket so we can help: 
remote:  https://help.heroku.com/ 
remote: 
remote:  Love, 
remote:  Heroku 
remote: 
remote: 
remote: !  Push rejected, failed to compile Node.js app 
remote: 
remote: Verifying deploy.... 
remote: 
remote: ! Push rejected to [REPOSITORY]. 
remote: 
To https://git.heroku.com/[REPOSITORY].git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'https://git.heroku.com/[REPOSITORY].git' 
+0

Welche Version des Knotens haben Sie auf Ihrem Computer? 'v4.x.x' oder' v0.12.x'? – topheman

+0

v4.x.x herearesomereandomwordstomeetminimumcommentlength – cannadayr

+0

Auch das bekommen ... aber lokal statt auf heroku – Seth

Antwort

4

Ich hatte genau das gleiche Problem. Downgrade der node Version von 4.1.1 zu 0.12.2 behebt das Problem für mich.

+0

gah, es stört mich, dass Downgrade die Lösung für viele ähnliche Probleme wie diese ist. Es stellte sich heraus, dass das Schluck-Sass ein Legacy-Modul war, das noch nicht einmal in der Anwendung verwendet wurde, also haben wir es aus dem Weltraum vernichtet. Es hat das Problem nicht gelöst, aber es hat es für uns "gelöst". – cannadayr

3

Ohne downgrade von nodejs kam ich vorbei, indem ich in meinem package.json die neueste Version von gulp sass angab. Meine alte Version von Gulp-Sass war 0.7.1 und jetzt ist es 2.0.4. Zu Heroku zu drücken wirkt wie ein Zauber.

Verwandte Themen