错误:找不到模块' assets-webpack-plugin'在詹金斯

时间:2016-11-11 17:11:15

标签: node.js jenkins npm webpack assets-webpack-plugin

执行webpack jenkins个作业时会出现以下错误。

webpack --config config/webpack.dev.js --progress --profile

Error: Cannot find module 'assets-webpack-plugin'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> 

npm ERR! Linux 3.16.0-33-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build:dev"
npm ERR! node v0.10.45
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE

1 个答案:

答案 0 :(得分:0)

This plugin didn't get installed due to incorrect node and npm version installed/used by Jenkins.

此方案需要在运行jenkins的ubuntu操作系统上进行版本升级:

  • node - v6.x.x
  • npm - v3.x.x

enter image description here