报错:

babel-node@6.5.3 postinstall D:\vue学习\vue-learn\node_modules\babel-node
> node message.js; sleep 10; exit 1;

internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'D:\vue学习\vue-learn\node_modules\babel-node\message.js;'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

解决:

就是需要卸掉 babel 安装 babel-cli 

npm uninstall babel --save-dev
npm install babel-loader babel-core --save-dev

报错:'babel-node' 不是内部或外部命令,也不是可运行的程序

解决:npm i babel-core babel-preset-es2015 babel-cli

Logo

前往低代码交流专区

更多推荐