为了账号安全,请及时绑定邮箱和手机立即绑定

Error: Cannot find module 'json-parse-better-errors' 到哪里都会报这个错,好奇怪npm 装了也不行


E:\学习资料\编程文件\webpack 案例\10.处理模板文件>webpack

C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:244

                                throw err;

                                ^


Error: Cannot find module 'json-parse-better-errors'

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)

    at Function.Module._load (internal/modules/cjs/loader.js:506:25)

    at Module.require (internal/modules/cjs/loader.js:636:17)

    at require (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)

    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack\lib\Compiler.js:7:19)

    at Module._compile (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)

    at Module.load (internal/modules/cjs/loader.js:598:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)

    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

    at Module.require (internal/modules/cjs/loader.js:636:17)

    at require (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)

    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack\lib\webpack.js:7:18)

    at Module._compile (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)

    at Module.load (internal/modules/cjs/loader.js:598:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)

    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

    at Module.require (internal/modules/cjs/loader.js:636:17)

    at require (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)

    at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\convert-argv.js:7:24)

    at Module._compile (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)

    at Module.load (internal/modules/cjs/loader.js:598:32)

    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)

    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

    at Module.require (internal/modules/cjs/loader.js:636:17)

    at require (internal/modules/cjs/helpers.js:20:18)

    at yargs.parse (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\bin\cli.js:241:14)

    at Object.parse (C:\Users\Administrator\AppData\Roaming\npm\node_modules\webpack-cli\node_modules\yargs\yargs.js:567:18)


E:\学习资料\编程文件\webpack 案例\10.处理模板文件>


正在回答

2 回答

为什么执行了还是会报错呀


0 回复 有任何疑惑可以回复我~

webpack-cli 装了么,装了的话,全局安装这个模块,npm install  json-parse-better-errors -g,这样安装应该不会有问题你可以试试。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Error: Cannot find module 'json-parse-better-errors' 到哪里都会报这个错,好奇怪npm 装了也不行

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信