簡體   English   中英

我在終端中有一個錯誤節點,你能幫我解決它嗎

[英]I have an error Node in Terminal, can you help me please to fix it

我有這個錯誤,請你幫幫我。 謝謝朱莉

上次登錄時間:12 月 23 日星期四 12:32:55 on ttys000 juliedecraene@Julies-MBP ~ % node -- version node:internal/modules/cjs/loader:936 throw err; ^

錯誤:在 Function.Module._loader (node:internal/cjsmodule) 的 Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) 處找不到模塊 '/Users/juliedecraene/version' :778:27) 在 Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v17.3.0 juliedecraene@Julies-MBP ~ %

juliedecraene@Julies-MBP ~ % npm -- 版本 { npm: '8.3.0', 節點: '17.3.0', v8: '9.6.180.15-node.12', lib z: '1 '1.2.11', brotli: '1.0.9', ares: '1.18.1', 模塊: '102', nghttp2: '1.45.1', napi: '8', llhttp: '6.0.4', openssl: '3.0.1+quic', cldr: '40.0', icu: '70.1', tz: '2021a3', unicode: '14.0', ngtcp2: '0.1.0-DEV', nghttp3: '0.1.0 -DEV' } juliedecraene@Julies-MBP ~ %

僅憑這些信息很難弄清楚出了什么問題,但可以通過以下方式進行快速故障排除:

  1. 確保在項目的根路徑下執行npm install
  2. You have a package.json and package-lock.json at the root of your project along with the main file (commonly app.js ) These files are created by using the npm install command in your terminal.
  3. 您正在項目的根目錄( app.jspackage文件所在的位置)執行npm命令。

這個問題也可能有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM