请参阅下文,了解我遇到的问题。 它一直工作正常,直到我尝试使用-Pprod构建。 然后我试着回到-Pdev,它失败了。 然后我尝试使用rm node_modules并执行npm安装,但仍然失败。
亲切的问候, Fergal。
fergal@Mint-Inspiron ~/dev/jhipster/bk_app $ npm install
> v8-debug@0.7.7 preinstall /home/fergal/dev/jhipster/bk_app/node_modules/.staging/v8-debug-b18f5420
> node -e 'process.exit(0)'
> v8-profiler@5.6.5 preinstall /home/fergal/dev/jhipster/bk_app/node_modules/.staging/v8-profiler-92a7f346
> node -e 'process.exit(0)'
npm WARN prefer global node-inspector@0.12.8 should be installed with -g
> v8-debug@0.7.7 install /home/fergal/dev/jhipster/bk_app/node_modules/v8-debug
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v51-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug@0.7.7 and node@7.8.0 (node-v51 ABI) (falling back to source compile with node-gyp)
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build'
CXX(target) Release/obj.target/debug/src/debug.o
../src/debug.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE nodex::Debug::Call(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/debug.cc:38:27: error: no matching function for call to ‘v8::Debug::Call(v8::Local<v8::Function>&)’
v8::Debug::Call(fn);
^
../src/debug.cc:38:27: note: candidate is:
In file included from ../src/debug.cc:1:0:
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:198:28: note: static v8::MaybeLocal<v8::Value> v8::Debug::Call(v8::Local<v8::Context>, v8::Local<v8::Function>, v8::Local<v8::Value>)
static MaybeLocal<Value> Call(Local<Context> context,
^
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:198:28: note: candidate expects 3 arguments, 1 provided
../src/debug.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE nodex::Debug::SendCommand(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/debug.cc:46:61: error: no matching function for call to ‘v8::Debug::GetDebugContext()’
Isolate* debug_isolate = v8::Debug::GetDebugContext()->GetIsolate();
^
../src/debug.cc:46:61: note: candidate is:
In file included from ../src/debug.cc:1:0:
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:248:25: note: static v8::Local<v8::Context> v8::Debug::GetDebugContext(v8::Isolate*)
static Local<Context> GetDebugContext(Isolate* isolate);
^
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:248:25: note: candidate expects 1 argument, 0 provided
../src/debug.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE nodex::Debug::RunScript(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/debug.cc:61:67: error: no matching function for call to ‘v8::Debug::GetDebugContext()’
Local<Context> debug_context = v8::Debug::GetDebugContext();
^
../src/debug.cc:61:67: note: candidate is:
In file included from ../src/debug.cc:1:0:
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:248:25: note: static v8::Local<v8::Context> v8::Debug::GetDebugContext(v8::Isolate*)
static Local<Context> GetDebugContext(Isolate* isolate);
^
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:248:25: note: candidate expects 1 argument, 0 provided
../src/debug.cc:66:54: error: no matching function for call to ‘v8::Debug::GetDebugContext()’
debug_context = v8::Debug::GetDebugContext();
^
../src/debug.cc:66:54: note: candidate is:
In file included from ../src/debug.cc:1:0:
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:248:25: note: static v8::Local<v8::Context> v8::Debug::GetDebugContext(v8::Isolate*)
static Local<Context> GetDebugContext(Isolate* isolate);
^
/home/fergal/.node-gyp/7.8.0/include/node/v8-debug.h:248:25: note: candidate expects 1 argument, 0 provided
make: *** [Release/obj.target/debug/src/debug.o] Error 1
make: Leaving directory `/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.16.0-38-generic
gyp ERR! command "/home/fergal/.nvm/versions/node/v7.8.0/bin/node" "/home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build/debug/v0.7.7/node-v51-linux-x64/debug.node" "--module_name=debug" "--module_path=/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build/debug/v0.7.7/node-v51-linux-x64"
gyp ERR! cwd /home/fergal/dev/jhipster/bk_app/node_modules/v8-debug
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/fergal/.nvm/versions/node/v7.8.0/bin/node /home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build/debug/v0.7.7/node-v51-linux-x64/debug.node --module_name=debug --module_path=/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build/debug/v0.7.7/node-v51-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/fergal/dev/jhipster/bk_app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 3.16.0-38-generic
node-pre-gyp ERR! command "/home/fergal/.nvm/versions/node/v7.8.0/bin/node" "/home/fergal/dev/jhipster/bk_app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/fergal/dev/jhipster/bk_app/node_modules/v8-debug
node-pre-gyp ERR! node -v v7.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
Failed to execute '/home/fergal/.nvm/versions/node/v7.8.0/bin/node /home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build/debug/v0.7.7/node-v51-linux-x64/debug.node --module_name=debug --module_path=/home/fergal/dev/jhipster/bk_app/node_modules/v8-debug/build/debug/v0.7.7/node-v51-linux-x64' (1)
> v8-profiler@5.6.5 install /home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/profiler/v5.6.5/node-v51-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-profiler@5.6.5 and node@7.8.0 (node-v51 ABI) (falling back to source compile with node-gyp)
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
make: Entering directory `/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build'
CXX(target) Release/obj.target/profiler/src/profiler.o
CXX(target) Release/obj.target/profiler/src/cpu_profiler.o
CXX(target) Release/obj.target/profiler/src/cpu_profile.o
CXX(target) Release/obj.target/profiler/src/cpu_profile_node.o
CXX(target) Release/obj.target/profiler/src/heap_profiler.o
../src/heap_profiler.cc: In member function ‘virtual v8::ActivityControl::ControlOption nodex::ActivityControlAdapter::ReportProgressValue(int, int)’:
../src/heap_profiler.cc:35:18: warning: ‘v8::TryCatch::TryCatch()’ is deprecated (declared at /home/fergal/.node-gyp/7.8.0/include/node/v8.h:7616): Use isolate version [-Wdeprecated-declarations]
TryCatch try_catch;
^
CXX(target) Release/obj.target/profiler/src/heap_snapshot.o
../src/heap_snapshot.cc: In static member function ‘static Nan::NAN_GETTER_RETURN_TYPE nodex::Snapshot::GetRoot(v8::Local<v8::String>, Nan::NAN_GETTER_ARGS_TYPE)’:
../src/heap_snapshot.cc:46:46: error: ‘class v8::Object’ has no member named ‘GetHiddenValue’
info.GetReturnValue().Set(info.This()->GetHiddenValue(__root));
^
../src/heap_snapshot.cc:50:20: error: ‘class v8::Object’ has no member named ‘SetHiddenValue’
info.This()->SetHiddenValue(__root, _root);
^
make: *** [Release/obj.target/profiler/src/heap_snapshot.o] Error 1
make: Leaving directory `/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 3.16.0-38-generic
gyp ERR! command "/home/fergal/.nvm/versions/node/v7.8.0/bin/node" "/home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-linux-x64/profiler.node" "--module_name=profiler" "--module_path=/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-linux-x64"
gyp ERR! cwd /home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/fergal/.nvm/versions/node/v7.8.0/bin/node /home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-linux-x64/profiler.node --module_name=profiler --module_path=/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/fergal/dev/jhipster/bk_app/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 3.16.0-38-generic
node-pre-gyp ERR! command "/home/fergal/.nvm/versions/node/v7.8.0/bin/node" "/home/fergal/dev/jhipster/bk_app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler
node-pre-gyp ERR! node -v v7.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
Failed to execute '/home/fergal/.nvm/versions/node/v7.8.0/bin/node /home/fergal/dev/jhipster/bk_app/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-linux-x64/profiler.node --module_name=profiler --module_path=/home/fergal/dev/jhipster/bk_app/node_modules/v8-profiler/build/profiler/v5.6.5/node-v51-linux-x64' (1)
> bk-app@0.0.0 postinstall /home/fergal/dev/jhipster/bk_app
> node node_modules/pngquant-bin/lib/install.js && node node_modules/phantomjs-prebuilt/install.js && npm run webpack:build
✔ pngquant pre-build test passed successfully
Found PhantomJS at /home/fergal/dev/jhipster/bk_app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs ...verifying
PhantomJS is previously installed at /home/fergal/dev/jhipster/bk_app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
> bk-app@0.0.0 webpack:build /home/fergal/dev/jhipster/bk_app
> webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.output.path: The provided value "./target/www" is not an absolute path!
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/home/fergal/.nvm/versions/node/v7.8.0/bin/node" "/home/fergal/.nvm/versions/node/v7.8.0/bin/npm" "run" "webpack:build"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bk-app@0.0.0 webpack:build: `webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bk-app@0.0.0 webpack:build script 'webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bk-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack --config webpack/webpack.vendor.js && webpack --config webpack/webpack.dev.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bk-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bk-app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/fergal/.npm/_logs/2017-04-11T22_46_26_295Z-debug.log
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN angular2-cookie@1.2.6 requires a peer of @angular/common@^2.0.0 but none was installed.
npm WARN angular2-cookie@1.2.6 requires a peer of @angular/core@^2.0.0 but none was installed.
npm WARN codelyzer@2.1.1 requires a peer of tslint@^4.0.0 but none was installed.
npm WARN ng-jhipster@0.1.12 requires a peer of @angular/core@4.0.0 but none was installed.
npm WARN ng-jhipster@0.1.12 requires a peer of @angular/http@4.0.0 but none was installed.
npm WARN ng2-translate@4.2.0 requires a peer of @angular/core@^2.0.0 but none was installed.
npm WARN ng2-translate@4.2.0 requires a peer of @angular/http@^2.0.0 but none was installed.
npm WARN react-addons-perf@0.14.8 requires a peer of react@^0.14.8 but none was installed.
npm WARN react-addons-shallow-compare@0.14.8 requires a peer of react@^0.14.8 but none was installed.
npm WARN react-object-inspector@0.2.1 requires a peer of react@^0.14.0 but none was installed.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: v8-debug@0.7.7 (node_modules/v8-debug):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: v8-debug@0.7.7 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: v8-profiler@5.6.5 (node_modules/v8-profiler):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: v8-profiler@5.6.5 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/home/fergal/.nvm/versions/node/v7.8.0/bin/node" "/home/fergal/.nvm/versions/node/v7.8.0/bin/npm" "install"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bk-app@0.0.0 postinstall: `node node_modules/pngquant-bin/lib/install.js && node node_modules/phantomjs-prebuilt/install.js && npm run webpack:build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bk-app@0.0.0 postinstall script 'node node_modules/pngquant-bin/lib/install.js && node node_modules/phantomjs-prebuilt/install.js && npm run webpack:build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bk-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node node_modules/pngquant-bin/lib/install.js && node node_modules/phantomjs-prebuilt/install.js && npm run webpack:build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bk-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bk-app
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/fergal/.npm/_logs/2017-04-11T22_46_26_364Z-debug.log
fergal@Mint-Inspiron ~/dev/jhipster/bk_app $
答案 0 :(得分:2)
同样的错误:
node-pre-gyp ERR!试图下载(404): https://node-inspector.s3.amazonaws.com/debug/v1.0.1/node-v57-win32-x64.tar.gz node-pre-gyp ERR!未找到v8-debug@1.0.1和。的预构建二进制文件 node@8.9.4(node-v57 ABI,未知)(回退到源代码编译 with node-gyp)
我尝试并确定:
npm install -g node-inspector@0.7.5
答案 1 :(得分:1)
无法发表评论,但是您是否尝试手动安装最新版本(1.0.0或更高版本)的节点检查程序? yarn add global node-inspector@latest
或npm install -g node-inspector@latest
答案 2 :(得分:0)
纱线升级
解决了我的问题。
也许生产依赖项导致了问题。 我现在回到dev,它正在工作。 还没有尝试过jhipster prod profile。
答案 3 :(得分:0)
在Windows上。打开您的Powershell(以管理员身份)并运行此命令npm install --global --production windows-build-tools
或访问https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions#microsoft-windows以获取更多说明。我希望这能解决问题,为我做了。