如何修复Webpack-cli中的`找不到模块。/ logging / Logger`

时间:2019-07-29 08:38:36

标签: node.js jenkins logging webpack

当我尝试使用jenkins的webpack-cli构建webpack时,出现以下错误。

我已经尝试过纱线升级,全局添加了webpack-cli .. 但什么也没发生。

以下代码是詹金斯获得的。     / var / lib / jenkins / workspace / websdk(开发)/node_modules/webpack-cli/bin/cli.js:93                     犯错                     ^

Error: Cannot find module './logging/Logger'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/lib/jenkins/workspace/websdk (develop)/node_modules/webpack/lib/Stats.js:12:21)
    at Module._compile (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/lib/jenkins/workspace/websdk (develop)/node_modules/webpack/lib/Compilation.js:30:15)
    at Module._compile (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/lib/jenkins/workspace/websdk (develop)/node_modules/webpack/lib/Compiler.js:20:21)
    at Module._compile (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/lib/jenkins/workspace/websdk (develop)/node_modules/webpack/lib/webpack.js:7:18)
    at Module._compile (/var/lib/jenkins/workspace/websdk (develop)/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

0 个答案:

没有答案