【问题标题】:I found an error during the npm run build我在 npm run build 期间发现了一个错误
【发布时间】:2020-02-17 02:02:06
【问题描述】:

我通过 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! all_find@1.0.0 build: `nuxt build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the all_find@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

【问题讨论】:

  • 你运行/执行了什么来产生这个错误?
  • 你能描述一下“我把nuxt项目放在linux服务器上”是什么意思吗?请概述重现此错误所需的步骤
  • 我通过git上传到Linux服务器上,就是我在Linux服务器上运行的画面!上传项目后,我升级了nuxt,然后我做了'npm run build'。
  • edit your question 并提供确切的步骤。您是如何“通过 git 上传” 的? “升级了nuxt”是什么意思?你运行了什么命令?您是否使用npm install 安装了所有项目依赖项?
  • 我在“git pull”命令下将项目从本地下载到服务器。我同时运行了“npm upgrade nuxt”和“npm install”。我已经更正了这个问题。谢谢。

标签: node.js vue.js npm nuxt.js


【解决方案1】:

这是一个 nvm 版本问题。更新到最新版本就可以解决这个问题了

【讨论】:

    猜你喜欢
    • 2021-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-10
    • 2022-08-17
    • 2021-08-10
    相关资源
    最近更新 更多