Reputation: 1687
I build the project of nuxt js locally, i.e., npm run build
, and push the project with .nuxt folder, but not the folder of node_modules.
Then run the command of npm run start
, failed.
The output info: sh: nuxt: command not found
Why?
Upvotes: 3
Views: 7286
Reputation: 7631
npm run start
will run the script from package.json
:
"scripts": {
"start": "nuxt start",
...
}
it's an alias to run node_modules/nuxt/bin/nuxt start
so the node_modules/
folder is mandatory.
Upvotes: 5