The problem with the deployment of the Nuxt project. How many minutes does the, npm start command get stuck and then report an error?

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

.

clipboard.png

clipboard.png

package.json


clipboard.png

clipboard.png
npm start babel
clipboard.png

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?

Jan.19,2022

I have the same problem. Why does npm start report no ES6 compilation error? I have installed babel. npm run dev has no problem

.
Menu