problem description
the project is initialized with create-nuxt-app, and after the development is completed using koa2
, you are ready to try it on the local deployment first, so you encounter a strange problem.
the project completes the npm build generation. There is no problem with the nuxt process, and there is no warning
, and then execute npm start
package.json
npm start babel
is it babel"s question to ask the great god for an answer? What"s wrong with the node version? The problem with the local version of the plug-in?
referenced articles
https://codeshelper.com/a/11.
https://codeshelper.com/a/11.
Update
use nodemon instead of node in the start command to run normally
"scripts": {
"start": "cross-env HOST=0.0.0.0 PORT=3007 NODE_ENV=production nodemon server/index.js --exec babel-node",
....
}
but in this way, npm start executes files packaged by server/index.js, and build. It doesn"t matter. If you use nuxt start, you must report an error. Should you configure babel in webpack?