[英]I have an error Node in Terminal, can you help me please to fix it
I have this error, can you help me out please.我有这个错误,请你帮帮我。 thanks Julie
谢谢朱莉
Last login: Thu Dec 23 12:32:55 on ttys000 juliedecraene@Julies-MBP ~ % node -- version node:internal/modules/cjs/loader:936 throw err;上次登录时间:12 月 23 日星期四 12:32:55 on ttys000 juliedecraene@Julies-MBP ~ % node -- version node:internal/modules/cjs/loader:936 throw err; ^
^
Error: Cannot find module '/Users/juliedecraene/version' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at 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: [] }错误:在 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 ~ % Node.js v17.3.0 juliedecraene@Julies-MBP ~ %
juliedecraene@Julies-MBP ~ % npm -- version { npm: '8.3.0', node: '17.3.0', v8: '9.6.180.15-node.12', uv: '1.42.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.18.1', modules: '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 ~ % 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 ~ %
It is hard to figure out what went wrong with just that information but a quick troubleshoot can be checking the following:仅凭这些信息很难弄清楚出了什么问题,但可以通过以下方式进行快速故障排除:
npm install
at the root path of your project.npm install
。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. 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.npm
commands at the root of your project (where app.js
and the package
files are).app.js
和package
文件所在的位置)执行npm
命令。 This question might also be helpful. 这个问题也可能有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.