meanjs / generator-meanjs

MEAN.JS Official Yeoman Generator
http://meanjs.org/
473 stars 178 forks source link

ubuntu not genarate #142

Open rumes opened 8 years ago

rumes commented 8 years ago

my node version v4.0.0 npm version 3.3.12 yo version 1.5.0 my operating system is ubuntu 14.04 and when I'm going to generate mean project from yo meanjs generator i get below error.

rumes@rumes-HP-ProBook-4530s:/var/www/html/meanjs$ sudo yo -meanjs ? 'Allo rumes! What would you like to do? Meanjs

Make sure you are in the directory you want to scaffold into. This generator can also be run with: yo meanjs

undefined You're using the official MEAN.JS generator. ? What mean.js version would you like to generate? master master ? In which folder would you like the project to be generated? This can be change? 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, ? 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? How would you describe your application in comma seperated key words? MongoDB, Express, AngularJS, Node.js ? What is your company/author name? rumes ? 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.

 _-----_
|       |    .-----------------------.
|--(o)--|    |      Bye from us!     |

---------´ | Chat soon. | ( _´U_ ) | Yeoman team | /_A\ | http://yeoman.io | | ~ | '-----------------------' **'.**.'__
´ |° ´ Y

Error: Command failed: /bin/sh -c cd mean && npm install npm WARN engine karma@0.12.37: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"4.0.0","npm":"3.3.12"}) npm WARN install Couldn't install optional dependency: Unsupported npm WARN install Couldn't install optional dependency: Unsupported npm WARN prefer global jshint@2.8.0 should be installed with -g npm WARN prefer global node-gyp@3.0.3 should be installed with -g npm WARN prefer global nodemon@1.3.8 should be installed with -g npm WARN prefer global node-inspector@0.10.2 should be installed with -g /var/www/html/meanjs/mean/node_modules/.bin/touch: 1: /var/www/html/meanjs/mean/node_modules/.bin/touch: Syntax error: "(" unexpected make: ** [Release/obj.target/bufferutil/src/bufferutil.o] Error 2 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-66-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 /var/www/html/meanjs/mean/node_modules/bufferutil gyp ERR! node -v v4.0.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: node-gyp rebuild npm WARN install:bufferutil@1.2.1 Exit status 1 In file included from ../src/bufferutil.cc:16:0: ../../nan/nan.h:261:25: error: redefinition of ‘template v8::Local _NanEnsureLocal(v8::Local)’ NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../../nan/nan.h:256:25: error: ‘template v8::Local _NanEnsureLocal(v8::Handle)’ previously declared here NAN_INLINE v8::Local NanEnsureLocal(v8::Handle 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::Localv8::Object NanNewBufferHandle(char, sizet, 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::Localv8::Object NanNewBufferHandle(const char, uint32t)’: ../../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/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:31:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, v8::Localv8::String, node::encoding) NODEEXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate, ^ /home/rumes/.node-gyp/4.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/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:43:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, char_, size_t) NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, ^ /home/rumes/.node-gyp/4.0.0/include/node/nodebuffer.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::Localv8::Object NanNewBufferHandle(uint32_t)’: ../../nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((sizet)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’ return node::Buffer::New(v8::Isolate::GetCurrent(), size); ^ ../../nan/nan.h: In function ‘v8::Localv8::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-66-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 /var/www/html/meanjs/mean/node_modules/node-inspector/node_modules/bufferutil gyp ERR! node -v v4.0.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:bufferutil@1.1.0 bufferutil@1.1.0 install: node-gyp rebuild npm WARN install:bufferutil@1.1.0 Exit status 1 In file included from ../src/validation.cc:15:0: ../../nan/nan.h:261:25: error: redefinition of ‘template v8::Local _NanEnsureLocal(v8::Local)’ NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../../nan/nan.h:256:25: error: ‘template v8::Local _NanEnsureLocal(v8::Handle)’ previously declared here NAN_INLINE v8::Local NanEnsureLocal(v8::Handle 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::Localv8::Object NanNewBufferHandle(char, sizet, 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::Localv8::Object NanNewBufferHandle(const char, uint32t)’: ../../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/validation.cc:10:0: /home/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:31:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, v8::Localv8::String, node::encoding) NODEEXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate, ^ /home/rumes/.node-gyp/4.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/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:43:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, char_, size_t) NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, ^ /home/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:43:40: note: no known conversion for argument 2 from ‘const char’ to ‘char_’ In file included from ../src/validation.cc:15:0: ../../nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32_t)’: ../../nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((sizet)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’ return node::Buffer::New(v8::Isolate::GetCurrent(), size); ^ ../../nan/nan.h: In function ‘v8::Localv8::Object NanBufferUse(char, uint32t)’: ../../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/validation/src/validation.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-66-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 /var/www/html/meanjs/mean/node_modules/node-inspector/node_modules/utf-8-validate gyp ERR! node -v v4.0.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:utf-8-validate@1.1.0 utf-8-validate@1.1.0 install: node-gyp rebuild npm WARN install:utf-8-validate@1.1.0 Exit status 1 /var/www/html/meanjs/mean/node_modules/.bin/touch: 1: /var/www/html/meanjs/mean/node_modules/.bin/touch: Syntax error: "(" unexpected make: * [Release/obj.target/validation/src/validation.o] Error 2 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-66-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 /var/www/html/meanjs/mean/node_modules/utf-8-validate gyp ERR! node -v v4.0.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: node-gyp rebuild npm WARN install:utf-8-validate@1.2.1 Exit status 1 In file included from ../src/debug.cc:2:0: ../node_modules/nan/nan.h:261:25: error: redefinition of ‘template v8::Local _NanEnsureLocal(v8::Local)’ NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { ^ ../node_modules/nan/nan.h:256:25: error: ‘template v8::Local _NanEnsureLocal(v8::Handle)’ previously declared here NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) { ^ ../node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared , node::smalloc::FreeCallback callback ^ ../node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’ , node::smalloc::FreeCallback callback ^ ../nodemodules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(char, size_t, int)’: ../node_modules/nan/nan.h:665:50: error: ‘callback’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../node_modules/nan/nan.h:665:60: error: ‘hint’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../nodemodules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(const char, uint32_t)’: ../nodemodules/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); ^ ../node_modules/nan/nan.h:672:67: note: candidates are: In file included from ../node_modules/nan/nan.h:25:0, from ../src/debug.cc:2: /home/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:31:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, v8::Localv8::String, node::encoding) NODEEXTERN v8::MaybeLocalv8::Object New(v8::Isolate isolate, ^ /home/rumes/.node-gyp/4.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/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:43:40: note: v8::MaybeLocalv8::Object node::Buffer::New(v8::Isolate, char_, size_t) NODE_EXTERN v8::MaybeLocalv8::Object New(v8::Isolate* isolate, ^ /home/rumes/.node-gyp/4.0.0/include/node/nodebuffer.h:43:40: note: no known conversion for argument 2 from ‘const char’ to ‘char_’ In file included from ../src/debug.cc:2:0: ../node_modules/nan/nan.h: In function ‘v8::Localv8::Object NanNewBufferHandle(uint32_t)’: ../node_modules/nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocalv8::Object’ to ‘v8::Localv8::Object’ return node::Buffer::New(v8::Isolate::GetCurrent(), size); ^ ../nodemodules/nan/nan.h: In function ‘v8::Localv8::Object NanBufferUse(char, uint32_t)’: ../nodemodules/nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’ return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); ^ ../src/debug.cc: In static member function ‘static void nodex::Debug::InternalConstructorName(const v8::FunctionCallbackInfov8::Value&)’: ../src/debug.cc:194:23: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] result_type = ""; ^ make: * [Release/obj.target/debug/src/debug.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/var/www/html/meanjs/mean/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-66-generic gyp ERR! command "/usr/local/bin/node" "/var/www/html/meanjs/mean/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/var/www/html/meanjs/mean/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64/debug.node" "--module_name=debug" "--module_path=/var/www/html/meanjs/mean/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64" gyp ERR! cwd /var/www/html/meanjs/mean/node_modules/v8-debug gyp ERR! node -v v4.0.0 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /var/www/html/meanjs/mean/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/var/www/html/meanjs/mean/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64/debug.node --module_name=debug --module_path=/var/www/html/meanjs/mean/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64' (1) node-pre-gyp ERR! stack at ChildProcess. (/var/www/html/meanjs/mean/node_modules/v8-debug/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:87:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:817:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) node-pre-gyp ERR! System Linux 3.13.0-66-generic node-pre-gyp ERR! command "/usr/local/bin/node" "/var/www/html/meanjs/mean/node_modules/v8-debug/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /var/www/html/meanjs/mean/node_modules/v8-debug node-pre-gyp ERR! node -v v4.0.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.15 node-pre-gyp ERR! not ok npm WARN EPEERINVALID mongodb-core@1.2.21 requires a peer of kerberos@~0.0 but none was installed. npm WARN EPACKAGEJSON mean@0.0.0 No repository field. npm ERR! Linux 3.13.0-66-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v4.0.0 npm ERR! npm v3.3.12 npm ERR! code ELIFECYCLE

npm ERR! v8-debug@0.4.6 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the v8-debug@0.4.6 install script 'node-pre-gyp install --fallback-to-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 v8-debug package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get their info via: npm ERR! npm owner ls v8-debug npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /var/www/html/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:817:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)

anyone can help me with that?.

ghost commented 8 years ago

same issue with me, node version v5.0.0 npm version 3.3.12 grunt-cli v0.1.13 bower 1.6.5 yo version 1.5.0 Python 2.7.6

OS: Linux [Host_Name] 3.16.0-53-generic #72~14.04.1-Ubuntu SMP Fri Nov 6 18:17:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ElementaryOS 0.3.1 Freya 64-bit

rumes commented 8 years ago

@cvcc found any solution man?.

ghost commented 8 years ago

@rumes i tested on a new virtual machine running Ubuntu server x64 14.04.3 LTS. i still got some similar errors, but the app is runnung now.

rumes commented 8 years ago

the errors not going to effect on future development?.

GeorgeWilliamson commented 8 years ago

I gave up on Ubuntu, all the same symptoms as the 1st post, had a good supply of hard disks so tried many clean installs, eventually after about a month loaded centos 7 and bingo, only takes 3 or minutes to do its stuff and no errors, have always used node version 10.40. Would say its something to do with Ubuntu and the present meanjs -generator, any way just a thought.

rumes commented 8 years ago

@GeorgeWilliamson thank for your thought man.

ilanbiala commented 8 years ago

@codydaig and I have worked to get rid of many of the bugs in 0.4.1, and today we released 0.4.2. Please try it out and if it resolves your issues, let us know!

rossvz commented 8 years ago

I'm also noticing issues on Ubuntu running on a VirtualBox instance. Is this an issue with Ubuntu and the meanjs generators, or is it a node version incompatibility?

ilanbiala commented 8 years ago

Our generator's CI is Linux, so I don't think that's the problem. I'm not sure what the problem is though, so I'd say try to reinstall the generator first.

rossvz commented 8 years ago

Is there an issue where: "npm install -g generator-meanjs" doesn't install the other sub-generators? image

ilanbiala commented 8 years ago

Which version do you have installed?

rossvz commented 8 years ago

generator-meanjs version 0.4.2, node version 4.2.4, npm version 3.5.3

ilanbiala commented 8 years ago

0.4.3 has been published, please try to see if the new version fixes your issue.

corvae commented 8 years ago

I'm using 0.4.4, and I got npm errors when I chose 0.4.0 or 0.4.1 for the first question (when running the generator). When I chose 0.4.2 or master, there were no errors (although running grunt for the first time warned me to install Ruby and Sass, which i didn't see in prereq's).

Linux Mint 18 (in VirtualBox), Node 6.3.1, npm 3.10.3, bower 1.7.9, mongodb 2.6.10, grunt-cli 1.2.0, gulp 3.9.1

codydaig commented 8 years ago

@corvae We don't support Node v6 yet.

corvae commented 8 years ago

Ok, thanks @codydaig .