gpt4 book ai didi

vue.js - 错误 : No build files found, 请在启动 `nuxt start 之前运行 `nuxt build`

转载 作者:搜寻专家 更新时间:2023-10-30 22:58:12 27 4
gpt4 key购买 nike

我使用

创建了一个 nuxt 样板文件

vue-cli nuxt-community/starter-template

我还创建了另一个使用

create-nuxt-app

.他们都正确地创建了我的样板。但任何时候我尝试使用

构建开始我的项目

yarn start

我收到这个错误:

Error: No build files found, please run nuxt build before launching `nuxt start

此外,每当我运行时

nuxt build

我明白了:

No command 'nuxt' found, did you mean: Command 'next' from package 'nmh' (universe) nuxt: command not found

但是当我运行的时候

yarn build

它构建并运行 yarn start 第二次工作但没有热模块重新加载。我不知道是什么问题。不知道我的yarn是断了还是nuxt。请帮忙!

最佳答案

nuxt build 无法在您的命令行中运行,因为您尚未将其添加到您的 PATH 变量中。 npm run build 将查找您的依赖项并使用它。

要运行开发服务器,请使用 npm run dev。我相信默认情况下它会在端口 3000 上启动一个实时重新加载的开发服务器。要构建生产环境,请使用 npm run buildnpm run start

关于vue.js - 错误 : No build files found, 请在启动 `nuxt start 之前运行 `nuxt build`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51809041/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com