前提摘要
构建项目使用官方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