我正在使用以下命令尝试install blueimp-file-upload-expressjs
:
npm i --save blueimp-file-upload-expressjs
但我有以下错误:
npm WARN package.json wa-exercise-6-2014-2015@0.0.0 No repository field. npm WARN package.json wa-exercise-6-2014-2015@0.0.0 No README data npm WARN deprecated lodash-node@2.4.1: This package is no longer maintained. See its readme for upgrade details. > lwip@0.0.6 install /Users/cell/Desktop/AtelierBeatsProject/AtelierBeats/node_modules/blueimp-file-upload-expressjs/node_modules/lwip > node-gyp rebuild 2015-11-29 15:25:47.811 xcodebuild[26274:1595302] [MT] PluginLoading: Required plug-in compatibility UUID 7265231C-39B4-402C-89E1-16167C4CC990 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ClangFormat.xcplugin' not present in DVTPlugInCompatibilityUUIDs 2015-11-29 15:25:47.812 xcodebuild[26274:1595302] [MT] PluginLoading: Skipping plug-in at path '/Library/Application Support/Developer/Shared/Xcode/Plug-ins/D for Xcode.xcplugin' because it is not compatible with this version of Xcode. CXX(target) Release/obj.target/lwip_decoder/src/decoder/init.o In file included from ../src/decoder/init.cpp:1: In file included from ../src/decoder/decoder.h:13: ../node_modules/nan/nan.h:120:25: error: redefinition of '_NanEnsureLocal' NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:115:25: note: previous definition is here NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) { ^ ../node_modules/nan/nan.h:207:68: error: too many arguments to function call, expected at most 2, have 4 return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv); ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ /Users/cell/.node-gyp/4.2.1/include/node/v8.h:4675:3: note: 'New' declared here static Local New( ^ In file included from ../src/decoder/init.cpp:1: In file included from ../src/decoder/decoder.h:13: ../node_modules/nan/nan.h:289:3: error: redefinition of 'NanNew' NanNew >( ^ ../node_modules/nan/nan.h:282:3: note: previous definition is here NanNew >( ^ ../node_modules/nan/nan.h:307:36: error: redefinition of 'NanNew' NAN_INLINE v8::Local NanNew( ^ ../node_modules/nan/nan.h:301:36: note: previous definition is here NAN_INLINE v8::Local NanNew( ^ ../node_modules/nan/nan.h:319:36: error: redefinition of 'NanNew' NAN_INLINE v8::Local NanNew( ^ ../node_modules/nan/nan.h:313:36: note: previous definition is here NAN_INLINE v8::Local NanNew( ^ ../node_modules/nan/nan.h:531:12: error: no matching function for call to '_NanEnsureLocal' return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent()))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:517:43: note: expanded from macro 'NanEscapeScope' # define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) ^~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:120:25: note: candidate template ignored: substitution failure [with T = v8::Primitive] NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:536:12: error: no matching function for call to '_NanEnsureLocal' return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent()))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:517:43: note: expanded from macro 'NanEscapeScope' # define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) ^~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:120:25: note: candidate template ignored: substitution failure [with T = v8::Primitive] NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:541:12: error: no matching function for call to '_NanEnsureLocal' return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent()))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:517:43: note: expanded from macro 'NanEscapeScope' # define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) ^~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:120:25: note: candidate template ignored: substitution failure [with T = v8::Boolean] NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:546:12: error: no matching function for call to '_NanEnsureLocal' return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent()))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:517:43: note: expanded from macro 'NanEscapeScope' # define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) ^~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:120:25: note: candidate template ignored: substitution failure [with T = v8::Boolean] NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:778:13: error: no member named 'smalloc' in namespace 'node' , node::smalloc::FreeCallback callback ~~~~~~^ ../node_modules/nan/nan.h:789:12: error: no matching function for call to 'New' return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^~~~~~~~~~~~~~~~~ /Users/cell/.node-gyp/4.2.1/include/node/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument NODE_EXTERN v8::MaybeLocal New(v8::Isolate* isolate, ^ /Users/cell/.node-gyp/4.2.1/include/node/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier NODE_EXTERN v8::MaybeLocal New(v8::Isolate* isolate, ^ /Users/cell/.node-gyp/4.2.1/include/node/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided NODE_EXTERN v8::MaybeLocal New(v8::Isolate* isolate, size_t length); ^ /Users/cell/.node-gyp/4.2.1/include/node/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided NODE_EXTERN v8::MaybeLocal New(v8::Isolate* isolate, ^ In file included from ../src/decoder/init.cpp:1: In file included from ../src/decoder/decoder.h:13: ../node_modules/nan/nan.h:793:12: error: no viable conversion from 'v8::MaybeLocal' to 'v8::Local' return node::Buffer::New(v8::Isolate::GetCurrent(), size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/cell/.node-gyp/4.2.1/include/node/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal' to 'const v8::Local &' for 1st argument class Local { ^ /Users/cell/.node-gyp/4.2.1/include/node/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal' to 'v8::Local &&' for 1st argument class Local { ^ /Users/cell/.node-gyp/4.2.1/include/node/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal' V8_INLINE Local(Local that) ^ /Users/cell/.node-gyp/4.2.1/include/node/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal' V8_INLINE Local(S* that) ^ In file included from ../src/decoder/init.cpp:1: In file included from ../src/decoder/decoder.h:13: ../node_modules/nan/nan.h:800:26: error: no member named 'Use' in namespace 'node::Buffer' return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); ~~~~~~~~~~~~~~^ ../node_modules/nan/nan.h:1897:12: error: no matching function for call to '_NanEnsureLocal' return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:517:43: note: expanded from macro 'NanEscapeScope' # define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) ^~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:120:25: note: candidate template ignored: substitution failure [with T = v8::Function] NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:1912:12: error: no matching function for call to '_NanEnsureLocal' return NanEscapeScope(node::MakeCallback( ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:517:43: note: expanded from macro 'NanEscapeScope' # define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) ^~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:120:25: note: candidate template ignored: substitution failure [with T = v8::Value] NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:1985:12: error: no matching function for call to '_NanEnsureLocal' return NanEscapeScope(handle->Get(NanNew(key)).As()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:517:43: note: expanded from macro 'NanEscapeScope' # define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) ^~~~~~~~~~~~~~~ ../node_modules/nan/nan.h:120:25: note: candidate template ignored: substitution failure [with T = v8::Object] NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ 16 errors generated. make: *** [Release/obj.target/lwip_decoder/src/decoder/init.o] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/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 Darwin 14.5.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/cell/Desktop/AtelierBeatsProject/AtelierBeats/node_modules/blueimp-file-upload-expressjs/node_modules/lwip gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm ERR! Darwin 14.5.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "--save" "blueimp-file-upload-expressjs" npm ERR! node v4.2.1 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! lwip@0.0.6 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lwip@0.0.6 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the lwip package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls lwip npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /Users/cell/Desktop/AtelierBeatsProject/AtelierBeats/npm-debug.log
这似乎是兼容性问题......
答案 0 :(得分:2)
有同样的问题。安装成功了:
npm install arvindr21/blueimp-file-upload-expressjs