【问题标题】:I've got nodejs installed but trying to run code in the terminal shows error "can't find module"我已经安装了 nodejs,但尝试在终端中运行代码显示错误 \"can\'t find module\"
【发布时间】:2022-08-14 21:18:53
【问题描述】:

VScode 错误消息说 shell 集成未激活

    标签: node.js windows visual-studio-code


    【解决方案1】:

    从你的截图来看:

    1. javascript 文件位于~/Documents/MY PROJECTS/hello.js
    2. 您正在尝试在 ~ 中运行 hello.js 文件。

      在您的情况下,~ 将是 EDWIN

      由于 Node js 找不到 hello.js 文件,因此会引发错误。使用cd Documents/MY PROJECTS找到正确的目录,然后尝试通过node hello.js运行js文件

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-20
      • 2021-04-13
      • 2021-12-07
      • 2016-02-15
      • 1970-01-01
      • 1970-01-01
      • 2019-11-01
      相关资源
      最近更新 更多