简体   繁体   English

错误:找不到模块 'stylelint' - Angular 项目

[英]Error: Cannot find module 'stylelint' - Angular Project

I'm trying to run this command to validate all the.scss (and even the.css files I tried too) and now it's presenting me with this error.我正在尝试运行此命令来验证所有 .scss (甚至我也尝试过的 .css 文件),现在它向我展示了这个错误。

$ stylelint "apps/**/*.scss"

1 time it worked and no longer, I restarted the computer and still. 1次它工作并且不再,我重新启动计算机并且仍然。

The stylelint is also globally installed and I have the latest version: stylelint 也是全局安装的,我有最新版本:

Error: Cannot find module 'stylelint'
Require stack:
- D:\DEV\Repos\Business\mobile-app-with-angular\node_modules\stylelint-order\index.js
- C:\Users\koalt\AppData\Roaming\npm\node_modules\stylelint\lib\augmentConfig.js
- C:\Users\koalt\AppData\Roaming\npm\node_modules\stylelint\lib\createStylelint.js
- C:\Users\koalt\AppData\Roaming\npm\node_modules\stylelint\lib\printConfig.js
- C:\Users\koalt\AppData\Roaming\npm\node_modules\stylelint\lib\cli.js
- C:\Users\koalt\AppData\Roaming\npm\node_modules\stylelint\bin\stylelint.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:981:15)
    at Function.Module._load (internal/modules/cjs/loader.js:863:27)
    at Module.require (internal/modules/cjs/loader.js:1043:19)
    at require (C:\Users\koalt\AppData\Roaming\npm\node_modules\stylelint\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
    at Object.<anonymous> (D:\DEV\Repos\Business\panama-mobile-app\node_modules\stylelint-order\index.js:1:88)
    at Module._compile (C:\Users\koalt\AppData\Roaming\npm\node_modules\stylelint\node_modules\v8-compile-cache\v8-compile-cache.js:194:30)       
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
    at Module.load (internal/modules/cjs/loader.js:1001:32)
    at Function.Module._load (internal/modules/cjs/loader.js:900:14)
    at Module.require (internal/modules/cjs/loader.js:1043:19)

From package.json:从 package.json:

"stylelint": "13.6.0",
"stylelint-config-standard": "20.0.0"

Thanks a lot for your answers.非常感谢你的回答。

No, the reason is that in the .stylelintrc.json file I was referencing another extension of a package that did not exist (I had initially dealt with sass until I realized that using the standard is possible).不,原因是在.stylelintrc.json文件中,我引用了不存在的 package 的另一个扩展名(我最初使用 Z1F8DC276F8040001419C64E9D18F09 处理了 Z1F8DC276F8040001419C64E9D18F09 标准)。

It was like this:是这样的:

{
    "extends": "stylelint-config-sass-guidleines",
    ...
}

Now this was the modification and it worked:现在这是修改并且它起作用了:

{
    "extends": "stylelint-config-standard",
    ...
}

Many thanks!非常感谢!

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

相关问题 错误找不到模块“角度” - Error Cannot find module 'angular' 找不到模块'@schemics/angular/utility/project' - Cannot find module '@schematics/angular/utility/project' Angular-8 找不到模块 [模块错误] - Angular-8 Cannot find module [Module Error] ng serve 的 Angular 项目错误找不到模块&#39;@ angular-devkit / core&#39; - Angular project error with ng serve Cannot find module '@ angular-devkit / core' Nativescript + Angular 项目错误:发生未处理的异常:找不到模块“@schematics/angular/utility/parse-name” - Nativescript + Angular project error: An unhandled exception occurred: Cannot find module '@schematics/angular/utility/parse-name' 使用angular2种子的angular2项目出现“找不到模块”错误 - 'Cannot find module' errors with angular2 project with angular2-seed 延迟加载错误:找不到模块 - Angular 7 - Lazy loading Error: Cannot find module - Angular 7 错误:找不到模块“ @ angular / compiler” - Error: Cannot find module '@angular/compiler' 在角度路由中找不到模块错误 - Cannot find module error in angular routing Angular 5 延迟加载错误:找不到模块 - Angular 5 lazy loading Error: Cannot find module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM