Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
. They both create my boilerplate properly. But anytime i try to build start my projects using
yarn start
I get this error:
Error: No build files found, please run
nuxt build
before launching
`nuxt start
furthermore, whenever i run
nuxt build
I get this:
No command 'nuxt' found, did you mean: Command 'next' from package
'nmh' (universe) nuxt: command not found
but when i run
yarn build
it builds and running yarn start a second time works but without hot module reloading. I don't know what the problem is. I don't know whether my yarn is broken or nuxt. Please help!
nuxt build
does not work from your command line, because you have not added it to your
PATH
variable.
npm run build
will look in your dependencies and use that instead.
To get a dev server running, use
npm run dev
. I believe by default it will start a dev server with live reload on port 3000. To build for production, use
npm run build
and
npm run start
.
–
–
–
–
In order to use nuxt commands (
nuxt build
)
add nuxt to global using
yarn global add nuxt
check out your package.json for available commands in the scripts property
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint"
nuxt build
or yarn build
are commands for production build
Lastly,
use nuxt
or yarn dev
for development with hot module reloading
check out the docs for more details
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.