angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

Testing the new ver 4 #2137

Closed RonAlmog closed 8 years ago

RonAlmog commented 8 years ago
Item Version
generator-angular-fullstack 4.0.1
Node 6.3.1
npm 3.10.5
Operating System Windows 10
etc etc
Item Answer
Transpiler TypeScript
Markup HTML
CSS CSS
Router ui-router
Client Tests Jasmine
DB MongoDB
Auth Y
etc etc

i'm trying to test the new version 4, as of now, the installation fails. should i install anything before that, other than yo and the generator itself? i have udated node and npm to the latest, just to be sure. there are many errors or warnings about deprecated libs.

so here is just the tail of the console output, with some errors that might shed some light, and i have copied the npm log file as well. thanks for any help in making this work.

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14 npm WARN optional Skipping failed optional dependency /stylint/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14 npm WARN optional Skipping failed optional dependency /gulp-watch/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14 npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Ron\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v6.3.1 npm ERR! npm v3.10.5 npm ERR! code ELIFECYCLE

npm ERR! iltorb@1.0.12 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the iltorb@1.0.12 install script 'node-gyp rebuild'. 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 iltorb 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 information on how to open an issue for this project with: npm ERR! npm bugs iltorb npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls iltorb npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! D:\Projects\MEAN\test4\npm-debug.log

D:\Projects\MEAN\test4>

npm-debug.txt

Awk34 commented 8 years ago

I recently added this to the readme:

node-gyp - You'll likely need to be able to use node-gyp, Node's tool for compiling native add-ons (for things like database drivers). See its Installation section for more instructions.

RonAlmog commented 8 years ago

thanks. i'll go try that now. maybe we should keep a list of pre-installations, like gulp, babel, typescript, etc. and what versions are expected. let's assume the user has a brand new machine, and she is installing everything from scratch. i will try to start that list in a separate issue.

Awk34 commented 8 years ago

pre-requisites are listed on the generator's readme. Other requirements are listed on the generated project's readme.

RonAlmog commented 8 years ago

true, it is in the list. must be new, i didn't see that before. it's a huge installation. do we absolutely need that? feels a bit bloated.

Awk34 commented 8 years ago

Yeah. node-gyp is used by plenty of modules. It just allows node bindings and compilation of other assets (C code)

RonAlmog commented 8 years ago

Yes, that solved the problem. Thanks!!

rrubio commented 8 years ago

Having same issue with following versions -

OS - Mac Node - v6.5.0 Npm - 3.10.3 node-gyp - v3.4.0

npm ERR! Darwin 15.6.0 npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v6.5.0 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE

npm ERR! iltorb@1.0.12 install: node-gyp rebuild npm ERR! Exit status 7 npm ERR! npm ERR! Failed at the iltorb@1.0.12 install script 'node-gyp rebuild'. 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 iltorb 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 information on how to open an issue for this project with: npm ERR! npm bugs iltorb npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls iltorb npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Applications/AMPPS/www/meanJS/npm-debug.log

RonAlmog commented 8 years ago

if it is the same problem... then you can use the same solution. install node-gyp. let us know how it goes.

thematho commented 8 years ago

Same issue, and updating node-gyp didn't worked neither npm cache clean. npm config set msvs_version 2015 is set and available however the same error appears:

\node_modules\iltorb
$ if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Los proyectos de esta solución se van a compilar de uno en uno. Para habilitar la compilación en paralelo, agregue el modificador "/m".
  dictionary.c
  bit_reader.c
  decode.c
  huffman.c
  state.c
  win_delay_load_hook.c
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliN otifyHook2': redefinition; different type modifiers [D:\Workspace\fullstack-demo\node_modules\iltorb\build\decode.vcx proj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliN
  otifyHook2'
  dictionary.c
  backward_references.c
  bit_cost.c
  block_splitter.c
  brotli_bit_stream.c
  cluster.c
  compress_fragment.c
  compress_fragment_two_pass.c
  encode.c
  entropy_encode.c
  histogram.c
  literal_cost.c
  memory.c
  metablock.c
  static_dict.c
  utf8_util.c
  win_delay_load_hook.c
C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliN otifyHook2': redefinition; different type modifiers [D:\Workspace\fullstack-demo\node_modules\iltorb\build\encode.vcx proj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliN
  otifyHook2'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Workspace\fullstack-demo\node_modules\iltorb
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
fullstack-demo@0.0.0 D:\Workspace\fullstack-demo
`-- (empty)

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm WARN optional Skipping failed optional dependency /stylint/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

npm ERR! iltorb@1.0.12 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iltorb@1.0.12 install script 'node-gyp rebuild'.
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 iltorb 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 information on how to open an issue for this project with:
npm ERR!     npm bugs iltorb
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls iltorb
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Workspace\fullstack-demo\npm-debug.log
npm ERR! code 1
RonAlmog commented 8 years ago

obviously something with this MSVC and or node-gyp is not installed correctly. i suggest open this as a new issue, this one is old and closed.

Gosh, i have no idea how did we come to be so dependent on microsoft products (that are obviously giving us grief whenever possible) in this so very open source project.

Let me copy for you from the node-gyp github documentation. (which is here: https://github.com/nodejs/node-gyp) make sure you did all the steps, including Visual C++ (yachh), and Visual Studio 2015 (brrrr).

On Windows:

Option 1: Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator). Option 2: Install tools and configuration manually:

Visual C++ Build Environment:

Option 1: Install Visual C++ Build Tools using the Default Install option.

Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.

:bulb: [Windows Vista / 7 only] requires .NET Framework 4.5.1 Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.)

Launch cmd, npm config set msvs_version 2015 If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.

thematho commented 8 years ago

Maybe a new issue is the best. After struggling with this I don't understand why node-gyp works fine with others generators that I have installed?

Update Solved the issue is related to npm v 3.10.3 which has an outdated dependency on node-gyp Related issue: https://github.com/felixrieseberg/windows-build-tools/issues/19

amalmansouri commented 8 years ago

I have tried all you solutions to resolved the problem but it's not resolved.

C:\Users\Ahmedows\WebstormProjects\Webadvex>node-gyp rebuild gyp info it worked if it ends with ok gyp info using node-gyp@3.4.0 gyp info using node@6.4.0 | win32 | x64 gyp info spawn C:\Python27\python.exe gyp info spawn args [ 'C:\Users\Ahmedows\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=auto', gyp info spawn args '-I', gyp info spawn args 'C:\Users\Ahmedows\WebstormProjects\Webadvex\build\config.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\Ahmedows\AppData\Roaming\npm\node_modules\node-gyp\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\Users\Ahmedows.node-gyp\6.4.0\include\node\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\Users\Ahmedows.node-gyp\6.4.0', gyp info spawn args '-Dnode_gyp_dir=C:\Users\Ahmedows\AppData\Roaming\npm\node_modules\node-gyp', gyp info spawn args '-Dnode_lib_file=node.lib', gyp info spawn args '-Dmodule_root_dir=C:\Users\Ahmedows\WebstormProjects\Webadvex', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'C:\Users\Ahmedows\WebstormProjects\Webadvex\build', gyp info spawn args '-Goutput_dir=.' ] gyp: binding.gyp not found (cwd: C:\Users\Ahmedows\WebstormProjects\Webadvex) while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Ahmedows\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:305:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) gyp ERR! System Windows_NT 10.0.14393 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Ahmedows\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Ahmedows\WebstormProjects\Webadvex gyp ERR! node -v v6.4.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok

this is what I'm having. npm-debug.txt

Any suggestion?

iiredalert commented 8 years ago

You could alternatively use the older version of the generator by installing it like this:

npm install -g generator-angular-fullstack@3.8.0

Awk34 commented 8 years ago

If you are still having issues with iltorb, remove shrink-ray from your dependencies and use compression instead

biks152207 commented 8 years ago

@Awk34 i am trying to deploy this app in digital ocean and i tried everything to run this app with about instruction.nothing works at all. i am in the middle of the project.I dont know but i am feeling it was my mistake to use angular fullstack for my application.Based on your last instruction.am i supposed to do npm uninstall shrink-ray --save and npm install compression --save and do npm install again.FYI i have a dist folder in my digital ocean server and trying to run

Awk34 commented 8 years ago

@biks152207 If you can't get shrink-ray to compile, remove it from your dependencies and use compression instead (it's JS-only). Then in server/config/express.js, change shrink-ray to compression

MarinAngelo commented 8 years ago

@iiredalert: does this work also with a sub generator? I tried "yo angular-fullstack@3.7.5:directive myDirective", doesn't work at all.

Awk34 commented 8 years ago

@MarinAngelo 4.x.x works with generator-ng-component 1.x.x. 3.x.x works with generator-ng-component 0.x.x.

I would suggest, however, to use 4.x.x

drochag commented 7 years ago

@Awk34 using compression worked for me. Same problems as above on

generator-angular-fullstack 4.1.0 Node 6.9.1 npm 3.10.8 Operating System macOS Sierra