Nuxt.js vue init nuxt-community/koa-template 初始化項目報錯

報錯提示:vue

Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In G:\project\vue\nuxt-learn\node_modules\backpack-core\babel.jsnode

問題緣由:backpack-core模塊版本低。webpack

 

 

 

 解決:更新backpack-coreweb

npm install --save-dev backpack-core@0.7.0npm

安裝警告:babel

npm WARN uglifyjs-webpack-plugin@0.4.6 requires a peer of webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 but none is installed. You must install peer dependencies yourself.ui

更新插件:插件

npm view uglifyjs-webpack-plugin versionsnuxt

npm i -D uglifyjs-webpack-plugin@2.2.0eslint

運行項目:

npm run dev 

報錯:

Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: Cannot read property 'eslint' of undefined
at Object.module.exports (G:\project\vue\nuxt-learn\node_modules\eslint-loader\index.js:148:18)

解決:根目錄下nuxt.config.js 更改 ctx.isClient 爲 ctx.Client

相關文章
相關標籤/搜索