vue init nuxt-community/koa-template nuxt-learn

achillesz
0
achillesz
commented 6 months ago

npm run dev

ERROR Failed to compile with 1 errors 18:43:53

error in ./server/index.js

Module build failed: Error: Plugin/Preset files are not allowed to export objects
, only functions. In /Users/achilles/yilong/nuxt-learn/node_modules/backpack-core
/babel.js

0
labike
0
labike
commented 2 months ago

remove all in "./node_modules/backpack-core/package.json dependencies", and paste this:

"dependencies": {
    "@babel/core": "^7.1.2",
    "babel-loader": "^8.0.2",
    "babel-preset-backpack": "^0.8.2",
    "cross-spawn": "^5.0.1",
    "friendly-errors-webpack-plugin": "^1.7.0",
    "json-loader": "^0.5.7",
    "nodemon": "^1.18.7",
    "ramda": "^0.23.0",
    "source-map-support": "^0.4.15",
    "webpack": "^4.23.1",
    "webpack-node-externals": "^1.7.2"
  },

then delete backpack-core node_modules.
then npm install

and may be you can get this error: webpack NoErrorPlugin

resolve this error, you need open backpack-core/config/webpack.config.js and change last line:

new webpack.NoEmitOnErrorsPlugin()
0
Informations
Question โ€ข Unresolved
#c39 - Created 6 months ago