找不到模块'@ babel / preset-env / data / built-ins.json'

时间:2019-03-19 21:24:15

标签: vue.js npm vue-cli-3 babel-loader

我不知道该怎么办。我的项目不再运行。我做了一些工作再次。但是仍然给出相同的错误。请帮忙。

C:\projects\management>npm run serve

> iot@0.1.0 serve C:\projects\management
> vue-cli-service serve

 INFO  Starting development server...
 98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors                                                                                                                                                  00:19:16

 error  in ./src/main.js

Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] C:\projects\management\src\main.js: Cannot find module '@babel/preset-env/data/built-ins.json' (While processing: "C:\\projects\\management\\node_modules\\@vue\\babel-preset-app\
\index.js")
    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 (internal/module.js:11:18)
    at getPolyfills (C:\projects\management\node_modules\@vue\babel-preset-app\index.js:18:24)
    at module.exports (C:\projects\management\node_modules\@vue\babel-preset-app\index.js:105:17)
    at loadDescriptor (C:\projects\management\node_modules\@babel\core\lib\config\full.js:165:14)
    at cachedFunction (C:\projects\management\node_modules\@babel\core\lib\config\caching.js:33:19)
    at loadPresetDescriptor (C:\projects\management\node_modules\@babel\core\lib\config\full.js:235:63)
    at config.presets.reduce (C:\projects\management\node_modules\@babel\core\lib\config\full.js:77:21)
    at Array.reduce (<anonymous>)
    at recurseDescriptors (C:\projects\management\node_modules\@babel\core\lib\config\full.js:74:38)
    at loadFullConfig (C:\projects\management\node_modules\@babel\core\lib\config\full.js:108:6)
    at process.nextTick (C:\projects\management\node_modules\@babel\core\lib\transform.js:28:33)
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickCallback (internal/process/next_tick.js:181:9)

 @ multi (webpack)-dev-server/client?http://172.31.197.161:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

我运行以下命令:npm install --save-dev @babel/preset-env但什么也没发生。

有人可以给我建议吗?

0 个答案:

没有答案