generate报错 make_nuxt generate 报错,生成dist文件夹中未生成index.html

在使用vue init nuxt-community/starter-template创建的Nuxt项目中,本地开发和npm run build及npm start部署均正常。但在执行npm run generate时遇到ENOTENT错误,报找不到dist/index.html文件。尝试移除所有动态路由后问题依旧,怀疑与动态路由配置无关,寻求解决方案。
摘要由CSDN通过智能技术生成

前提摘要

构建项目使用官方vue init nuxt-community/starter-template 方法创建的nuxt项目

本地开发无问题

npm run build及 npm start部署到now.sh无问题

错误产生

本地执行npm run generate报错:

{ Error: ENOENT: no such file or directory, lstat '/Users/casen/worker/webFile/nuxt/nuxtStarterTest/dist/index.html'

at Error (native)

errno: -2,

code: 'ENOENT',

syscall: 'lstat',

path: '/Users/casen/worker/webFile/nuxt/nuxtStarterTest/dist/index.html' }

npm ERR! Darwin 15.3.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "generate"

npm ERR! node v6.10.0

npm ERR! npm v3.10.10

npm ERR! code ELIFECYCLE

npm ERR! nuxt_starter_test@1.0.0 generate: `nuxt generate`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the nuxt_starter_test@1.0.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值