簡體   English   中英

拋出錯誤/MODULE_NOT_FOUND

[英]throw err/MODULE_NOT_FOUND

嘗試在 VSC 上的終端中運行node index.js時遇到此問題。

這是錯誤,

[Try the new cross-platform PowerShell https://aka.ms/pscore6

PS Z:\01 Code notes> node index.js
node:internal/modules/cjs/loader:944
throw err;
^

Error: Cannot find module 'Z:\01 Code notes\index.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)        
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
PS Z:\01 Code notes> ][1]

我嘗試了很多不同的東西。 我在這些頁面上嘗試了所有建議的修復, 節點 MODULE_NOT_FOUND

為什么 VsCode NPM 會拋出找不到模塊的錯誤?

https://github.com/Microsoft/vscode/issues/65893

有什么建議么?

這意味着您正在使用尚未安裝的模塊,請檢查您的代碼。

暫無
暫無

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

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