【问题标题】:Angular Gulp setup with latest NodeJS version带有最新 NodeJS 版本的 Angular Gulp 设置
【发布时间】:2016-01-26 02:13:55
【问题描述】:

我一直在关注我的 AngularJS 项目的 gulp 设置的 repo A healthy Gulp Setup

我可以在旧版本的 nodejs 中成功地进行此操作。但是在我的另一个系统上,我安装了一个较新的版本“NodeJS 4.2.2”,我得到了很多依赖错误。

最初尝试npm install 时出现错误

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

我尝试将 package.json 中的 karma 版本从 0.10 修改为 0.13。这次 npm install 在处理 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

有什么解决办法吗?我更喜欢使用最新的节点版本。 任何帮助,将不胜感激。提前致谢。

【问题讨论】:

    标签: angularjs node.js gulp


    【解决方案1】:

    试试angularcoffee-boilerplate,这是 AngularJS 的项目模板,其中预先配置了 npm 和 Gulp。只需克隆项目,使用脚本install_prerequisites.bat 安装先决条件并使用命令npm start 启动服务器

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-24
      • 1970-01-01
      • 1970-01-01
      • 2019-08-12
      • 1970-01-01
      • 2020-03-25
      相关资源
      最近更新 更多