Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

yo meanjs fail #1054

Closed
charlie0077 opened this issue Nov 10, 2015 · 2 comments
Closed

yo meanjs fail #1054

charlie0077 opened this issue Nov 10, 2015 · 2 comments
Assignees

Comments

@charlie0077
Copy link

I try runing "yo meanjs mean", got error in terminal: (I chose meanjs 0.4.1)


This may take a couple minutes.
Error: Command failed: /bin/sh -c cd mean && npm install
npm WARN engine [email protected]: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"5.0.0","npm":"3.3.6"})
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
In file included from ../src/bufferutil.cc:16:
../../nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
^
../../nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {
^
../../nan/nan.h:661:13: error: no member named 'smalloc' in namespace 'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../../nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~

Some log from npm-debug.log

127150 silly gentlyRm /Users/xxx/work/meanjs/mean/node_modules/.bin/node-inspector is being purged
127151 info build /Users/xxx/work/meanjs/mean/node_modules/node-inspector/node_modules/bufferutil
127152 verbose gentlyRm don't care about contents; nuking /Users/xxx/work/meanjs/mean/node_modules/.bin/node-debug
127153 verbose gentlyRm don't care about contents; nuking /Users/xxx/work/meanjs/mean/node_modules/.bin/node-inspector
127154 info lifecycle [email protected]preinstall: [email protected]
127155 silly lifecycle [email protected]
preinstall: no script for preinstall, continuing
127156 info linkStuff [email protected]
127157 silly linkStuff [email protected] has /Users/xxx/work/meanjs/mean/node_modules/node-inspector/node_modules as its parent node_modules
127158 verbose linkBins [email protected]
127159 verbose linkMans [email protected]
127160 verbose rebuildBundles [email protected]
127161 info lifecycle [email protected]install: [email protected]
127162 verbose lifecycle [email protected]
install: unsafe-perm in lifecycle true
127163 verbose lifecycle [email protected]install: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/xxx/work/meanjs/mean/node_modules/node-inspector/node_modules/bufferutil/node_modules/.bin:/Users/xxx/work/meanjs/mean/node_modules/node-inspector/node_modules/.bin:/Users/xxx/work/meanjs/mean/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
127164 verbose lifecycle [email protected]
install: CWD: /Users/xxx/work/meanjs/mean/node_modules/node-inspector/node_modules/bufferutil
127165 silly lifecycle [email protected]install: Args: [ '-c', 'node-gyp rebuild' ]
127166 silly lifecycle [email protected]
install: Returned: code: 1 signal: null
127167 info lifecycle [email protected]~install: Failed to exec install script
127168 verbose unlock done using /Users/xxx/.npm/_locks/staging-83821a4febaa2415.lock for /Users/xxx/work/meanjs/mean/node_modules/.staging
127169 silly rollbackFailedOptional Starting
127170 silly rollbackFailedOptional Finishing
127171 silly runTopLevelLifecycles Starting
127172 silly runTopLevelLifecycles Finishing
127173 silly install printInstalled
127174 warn EPEERINVALID [email protected] requires a peer of kerberos@~0.0 but none was installed.
127175 warn EPACKAGEJSON [email protected] No repository field.
127176 verbose stack Error: [email protected] install: node-gyp rebuild
127176 verbose stack Exit status 1
127176 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:233:16)
127176 verbose stack at emitTwo (events.js:87:13)
127176 verbose stack at EventEmitter.emit (events.js:172:7)
127176 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
127176 verbose stack at emitTwo (events.js:87:13)
127176 verbose stack at ChildProcess.emit (events.js:172:7)
127176 verbose stack at maybeClose (internal/child_process.js:818:16)
127176 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
127177 verbose pkgid [email protected]
127178 verbose cwd /Users/xxx/work/meanjs/mean
127179 error Darwin 14.5.0
127180 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
127181 error node v5.0.0
127182 error npm v3.3.6
127183 error code ELIFECYCLE
127184 error [email protected] install: node-gyp rebuild
127184 error Exit status 1
127185 error Failed at the [email protected] install script 'node-gyp rebuild'.
127185 error This is most likely a problem with the bufferutil package,
127185 error not with npm itself.
127185 error Tell the author that this fails on your system:
127185 error node-gyp rebuild
127185 error You can get their info via:
127185 error npm owner ls bufferutil
127185 error There is likely additional logging output above.
127186 verbose exit [ 1, true ]

@maximmai
Copy link

I am having the same issue. Some Google searching directed me to an older version (<2.0.0) of nan is used by bson-ext, but I don't see that being used in the meanjs directory.

Environment:
OS: UBUNTU 14.04 64bit
Node Version: 5.0

Error Log:

$ yo meanjs
undefined
You're using the official MEAN.JS generator.
? What mean.js version would you like to generate? 0.4.0
0.4.0
? In which folder would you like the project to be generated? This can be changed later. mean
Cloning the MEAN repo.......

? What would you like to call your application? MEAN
? How would you describe your application? Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js
? How would you describe your application in comma seperated key words? MongoDB, Express, AngularJS, Node.js
? What is your company/author name? 
? Would you like to generate the article example CRUD module? Yes
? Would you like to generate the chat example module? Yes
   create mean/package.json
   create mean/bower.json
   create mean/config/env/default.js
Running npm install for you....
This may take a couple minutes.
Error: Command failed: /bin/sh -c cd mean && npm install
npm WARN engine [email protected]: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"5.0.0","npm":"3.3.6"})
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
npm WARN prefer global [email protected] should be installed with -g
In file included from ../src/bufferutil.cc:16:0:
../../nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../../nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../../nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../../nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../../nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../../nan/nan.h:672:67: note: candidates are:
In file included from ../src/bufferutil.cc:10:0:
/home/maximmai/.node-gyp/5.0.0/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,
                                        ^
/home/maximmai/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/maximmai/.node-gyp/5.0.0/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,
                                        ^
/home/maximmai/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/bufferutil.cc:16:0:
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:676: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);
                                                             ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
make: *** [Release/obj.target/bufferutil/src/bufferutil.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 Linux 3.13.0-67-generic
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 /home/maximmai/webroot/meanjs/mean/node_modules/node-inspector/node_modules/bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN EPEERINVALID [email protected] requires a peer of kerberos@~0.0 but none was installed.
npm WARN EPACKAGEJSON [email protected] No repository field.
npm ERR! Linux 3.13.0-67-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm  v3.3.6
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bufferutil 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 bufferutil
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/maximmai/webroot/meanjs/mean/npm-debug.log

    at ChildProcess.exithandler (child_process.js:203:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

@ilanbiala
Copy link
Member

Please post in the generator repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants