简体   繁体   中英

Angular Gulp setup with latest NodeJS version

I have been following the repo A healthy Gulp Setup for the gulp setup of my AngularJS project.

I can successfully proceed with this in an older version of nodejs. But on my another system, I have installed a newer version " NodeJS 4.2.2 " and I get many dependency errors.

At initial try of npm install I got the error

npm WARN engine karma@0.10.10: wanted: {"node":"~0.8 || ~0.10"} (current: {"node
":"4.2.2","npm":"2.14.7"})

I tried modifying the karma version in package.json from 0.10 to 0.13 . This time the npm install hangs for hours while processing bufferutil.

C:\wamp\www\ros_ui\node_modules\karma\node_modules\socket.io\node_modules\socket
.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil
>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_mo
dules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
 )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  bufferutil.cc
  win_delay_load_hook.c
     Creating library C:\wamp\www\ros_ui\node_modules\karma\node_modules\socket
  .io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\
  ws\node_modules\bufferutil\build\Release\bufferutil.lib and object C:\wamp\ww
  w\ros_ui\node_modules\karma\node_modules\socket.io\node_modules\socket.io-cli
  ent\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil\bui
  ld\Release\bufferutil.exp
  Generating code
  Finished generating code
  bufferutil.vcxproj -> C:\wamp\www\ros_ui\node_modules\karma\node_modules\sock
  et.io\node_modules\socket.io-client\node_modules\engine.io-client\node_module
  s\ws\node_modules\bufferutil\build\Release\\bufferutil.node

Is there any work around for this? I would prefer going with latest node version. Any help would be appreciated. Thanks in Advance.

Try angularcoffee-boilerplate , this is a project template for AngularJS where npm and Gulp are preconfigured. Just clone the project, install prerequisites with the script install_prerequisites.bat and start the server with the command npm start

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM