Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vue.js/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js 将Babel插件添加到Vue CLI项目不起作用_Vue.js_Babeljs_Vue Cli - Fatal编程技术网

Vue.js 将Babel插件添加到Vue CLI项目不起作用

Vue.js 将Babel插件添加到Vue CLI项目不起作用,vue.js,babeljs,vue-cli,Vue.js,Babeljs,Vue Cli,我正在尝试将Babel添加到已存在的Vue CLI项目中。请按照此处的说明操作: 我试过: vue add babel 这将导致以下错误: npm ERR! code E404 npm ERR! 404 Not Found - GET http://registry.npmjs.org/vue-cli-plugin-babel - Not found npm ERR! 404 npm ERR! 404 'vue-cli-plugin-babel@latest' is not in the n

我正在尝试将Babel添加到已存在的Vue CLI项目中。请按照此处的说明操作:

我试过:

vue add babel
这将导致以下错误:

npm ERR! code E404
npm ERR! 404 Not Found - GET http://registry.npmjs.org/vue-cli-plugin-babel - Not found
npm ERR! 404
npm ERR! 404  'vue-cli-plugin-babel@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tomlewis1/.npm/_logs/2019-10-21T17_11_26_039Z-debug.log
 ERROR  command failed: npm install --loglevel error -D vue-cli-plugin-babel

我已尝试删除NPM缓存并更新NPM、节点和Vue CLI。我应该指定另一个注册表吗?

我遇到了相同的错误。认为这可能是一个bug,但使用
vue add@vue/cli插件babel
似乎有效。试试看