我通过git把nuxt项目上传到linux服务器上,然后用 "npm upgrade nuxt",再用 "npm run build"。然而,我在构建时遇到了一个错误。我应该怎么做?
以下是我的错误代码
FATAL Nuxt build error 00:42:06
at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:5309:21)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
╭─────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
│ │
│ Error: Nuxt build error │
│ │
╰─────────────────────────────╯
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `nuxt build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
这是一个nvm版本的问题,更新到最新的版本,你就可以解决这个问题了。