前端工具webpack配置babel老报错

任磊ABC 发布于 2017/03/20 18:09
阅读 594
收藏 0

我在使用webpack配置babel的时候,老是报错!错误是,有很多模块没有被安装,具体如下:ERROR in ./app/main.js
Module build failed: Error: Cannot find module 'trim-right'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/renleilei/webpackSampleProgect/node_modules/.6.24.0@babel-generator/lib/buffer.js:9:18)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/renleilei/webpackSampleProgect/node_modules/.6.24.0@babel-generator/lib/printer.js:41:15)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/renleilei/webpackSampleProgect/node_modules/.6.24.0@babel-generator/lib/index.js:35:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/renleilei/webpackSampleProgect/node_modules/.6.24.0@babel-core/lib/transformation/file/index.js:58:23)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)

加载中
返回顶部
顶部