将 Babel 插件添加到 Vue CLI 项目不起作用
Adding Babel plugin to Vue CLI project not working
我正在尝试将 Babel 添加到现有的 Vue CLI 项目中。按照此处的说明进行操作:https://www.npmjs.com/package/@vue/cli-plugin-babel
我试过了:
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。我应该指定另一个注册表吗?
我遇到了同样的错误。认为这可能是一个错误,但使用 vue add @vue/cli-plugin-babel
似乎有效。试一试!
我正在尝试将 Babel 添加到现有的 Vue CLI 项目中。按照此处的说明进行操作:https://www.npmjs.com/package/@vue/cli-plugin-babel
我试过了:
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。我应该指定另一个注册表吗?
我遇到了同样的错误。认为这可能是一个错误,但使用 vue add @vue/cli-plugin-babel
似乎有效。试一试!