英文:
when i try to run this cmd "npm run compile:sass" is show me this error
问题
'CSS' 未被识别为内部或外部命令,可执行程序或批处理文件。
node:internal/modules/cjs/loader:1078
throw err;
^
错误:找不到模块 'D:\Takbeer\Courses\node-sass\bin\node-sass'
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
英文:
Code Git Repo:
https://github.com/TakbeerAli/CssError
'CSS' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:1078
throw err;
^
Error: Cannot find module 'D:\Takbeer\Courses\node-sass\bin\node-sass'
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
答案1
得分: 0
也许你只需要安装你没有的模块?
使用 "npm install package-name" 或者如果你的目录中有 package-lock.json 文件,只需使用 "npm ci" 命令。
如果我错了,请有人纠正我
英文:
Maybe you just need to install module that you don't have?
Use "npm install package-name" or if you have package-lock.json file in you directory just use "npm ci" command.
If I'm wrong please someone correct me
答案2
得分: 0
没有错误在代码中。当我将项目文件夹从子文件夹移动到其父文件夹(如磁盘:C或E)时,这解决了我的问题并开始正常工作。
英文:
There is no error in the code. When I move my project folder from the child folder to its parent folder Like ( Disk: C or E ), this solves my problem and starts working
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论