通过npm安装可以运行,通过yarn安装报错?
来源:4-2 构建初始项目首次验证公众号服务器
拖车板牙爵士
2017-08-04
初始化项目:vue init nuxt/koa ice
然后运行了:yarn install,显示如下图
然后npm run dev,在终端显示
E:\ice>npm run dev > ice@1.0.0 dev E:\ice > backpack dev (node:1756) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
在浏览器显示
Error: Cannot find module 'es6-promise\auto' from 'E:\ice' at Function.module.exports [as sync] (E:\ice\node_modules\resolve\lib\sync.js:40:15) at r (E:\ice\node_modules\vue-server-renderer\build.js:7741:44) at Object.<anonymous> (webpack:/external "es6-promise/auto":1:0) at __webpack_require__ (webpack:/webpack/bootstrap 121c449d50d059879b52:25:0) at Object.<anonymous> (server-bundle.js:1358:75) at __webpack_require__ (webpack:/webpack/bootstrap 121c449d50d059879b52:25:0) at Object.<anonymous> (server-bundle.js:996:65) at __webpack_require__ (webpack:/webpack/bootstrap 121c449d50d059879b52:25:0) at server-bundle.js:92:18 at Object.<anonymous> (server-bundle.js:95:10) at evaluateModule (E:\ice\node_modules\vue-server-renderer\build.js:7747:21) at E:\ice\node_modules\vue-server-renderer\build.js:7805:18 at E:\ice\node_modules\vue-server-renderer\build.js:7797:14 at Object.renderToString (E:\ice\node_modules\vue-server-renderer\build.js:7951:9) at P (E:\ice\node_modules\nuxt\node_modules\pify\index.js:49:6) at Object.<anonymous> (E:\ice\node_modules\nuxt\node_modules\pify\index.js:11:9)
我删除项目,重新初始化一个新项目,通过npm install,然后npm run dev没有问题,是可以正常运行的?
node、npm、webpack全部都升级了一遍还是不行
写回答
1回答
-
Scott
2017-08-06
那么就用 npm 替代 yarn 来安装模块和运行项目吧,yarn 是强锁定版本,可能安装中模块资源没成功下载。
00
相似问题