简体   繁体   English

我在终端中有一个错误节点,你能帮我解决它吗

[英]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:仅凭这些信息很难弄清楚出了什么问题,但可以通过以下方式进行快速故障排除:

  1. Make sure you executed npm install at the root path of your project.确保在项目的根路径下执行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. 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. You are executing npm commands at the root of your project (where app.js and the package files are).您正在项目的根目录( app.jspackage文件所在的位置)执行npm命令。

This question might also be helpful. 这个问题也可能有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我对 discord.js rpc 有错误? 有人可以帮帮我吗? - I have an error for discord.js rpc! Can someone please help me? 已安装节点但未安装 npm 请帮我修复 - node installed but npm is not installed please help me to fix 我的 Discord.JS 代码有一个奇怪的错误,你能帮我解决这个问题吗? - My code for Discord.JS is having a strange error, can you please help me solve this? 我的 node.js 应用程序在本地工作,但在 Heroku 上不起作用,给出了“应用程序错误”。 日志尾部是这样的。 你能帮我解决这个问题吗? - My node.js App works locally but does not work on Heroku gives "application error". The log tail is like this. Can you help me fix this? 我正在尝试显示来自外部 api 的数据,如果有人可以帮助我解决代码中的问题 - i am trying to display data from an external api, if someone can please help me to fix the issue in my code 我该如何解决以下任何一个错误,建议我 - how can I Fix below error any one please suggest me 你能帮我解决这个节点js错误吗? “模块_未找到” - Can you help me solve this node js error? “Module_Not_Found” 请帮助我理解我从 DELETE 方法得到的这个错误 - Please help me understand this error I get from DELETE method Node.js —请帮助我进行递归 - Node.js — please help me with recursion 使用 NODE js,我输入终端 npm,它开始向我显示错误。 而我解决不了 - with NODE js, I type in Terminal npm, and it starts showing me the error. And I can't solve it
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM