Comments (11)
I solved the issue by rm node_modules package-lock.json && npm install
. After that, some postcss packages are installed and updated. I don't know why.
from vscode-stylelint.
I just tried to reproduce it on a new project without any success. But I managed to solve it in one of my projects.
Here is what I did:
- Uninstall
prettier-stylelint
npm rm prettier-stylelint
Don't know why I installed this, but this package seems to install an older version ofpostcss-html
. rm -rf node_modules package-lock.json && npm install
just like @guoyunhe described.
After that the error message for Markdown files and Vue files is gone.
from vscode-stylelint.
Edit: Might this issue make more sense in the extension's repository?
Yes, I'll transfer the issue as I can't replicate the problem using the CLI.
from vscode-stylelint.
I'll check when I have access to that laptop again, next week.
from vscode-stylelint.
I had tried that and it didn't work for me. I could try again when I get back. It seemed to be an issue with guocong3000's not maintained (recently) postcss-markdown, if I remember.
from vscode-stylelint.
I am still getting this error. Any update on this?
from vscode-stylelint.
I'm unable to reproduce this locally. Are you still having the issue with the latest versions of stylelint and the extension?
from vscode-stylelint.
I have the same issue in Markdown and SCSS files, with latest stylelint and stylelint vscode plugin:
stylelint 13.2.1
stylelint vscode 0.83.0
vscode 1.43.0
When saving Markdown files:
Error: Cannot find module 'postcss-html/extract' Require stack: - /home/guo/git/advclb/stylelint-config/node_modules/postcss-markdown/extract.js - /home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/processor.js - /home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/parse.js - /home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/index.js - /home/guo/git/advclb/stylelint-config/node_modules/stylelint/lib/getPostcssResult.js - /home/guo/git/advclb/stylelint-config/node_modules/stylelint/lib/createStylelint.js - /home/guo/git/advclb/stylelint-config/node_modules/stylelint/lib/index.js - /home/guo/.vscode/extensions/stylelint.vscode-stylelint-0.83.0/lib/stylelint-vscode/index.js - /home/guo/.vscode/extensions/stylelint.vscode-stylelint-0.83.0/server.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15) at Module._load (internal/modules/cjs/loader.js:622:27) at Module._load (electron/js2c/asar.js:717:26) at Function.Module._load (electron/js2c/asar.js:717:26) at Module.require (internal/modules/cjs/loader.js:775:19) at require (internal/modules/cjs/helpers.js:68:18) at mdParser (/home/guo/git/advclb/stylelint-config/node_modules/postcss-markdown/extract.js:9:12) at processor (/home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/processor.js:25:43) at Object.parse (/home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/parse.js:25:10) at new LazyResult (/home/guo/git/advclb/stylelint-config/node_modules/stylelint/node_modules/postcss/lib/lazy-result.js:60:16)
When saving SCSS files:
Error: Cannot find module 'postcss-scss' Require stack: - /home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/get-syntax.js - /home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/parser.js - /home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/parse.js - /home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/index.js - /home/guo/git/advclb/stylelint-config/node_modules/stylelint/lib/getPostcssResult.js - /home/guo/git/advclb/stylelint-config/node_modules/stylelint/lib/createStylelint.js - /home/guo/git/advclb/stylelint-config/node_modules/stylelint/lib/index.js - /home/guo/.vscode/extensions/stylelint.vscode-stylelint-0.83.0/lib/stylelint-vscode/index.js - /home/guo/.vscode/extensions/stylelint.vscode-stylelint-0.83.0/server.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:717:15) at Module._load (internal/modules/cjs/loader.js:622:27) at Module._load (electron/js2c/asar.js:717:26) at Function.Module._load (electron/js2c/asar.js:717:26) at Module.require (internal/modules/cjs/loader.js:775:19) at require (internal/modules/cjs/helpers.js:68:18) at requireSyntax (/home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/get-syntax.js:31:19) at getSyntax (/home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/get-syntax.js:50:10) at parser (/home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/parser.js:9:17) at Object.parse (/home/guo/git/advclb/stylelint-config/node_modules/postcss-syntax/parse.js:28:10)
My package.json:
"dependencies": {
"stylelint-config-prettier": "latest",
"stylelint-config-standard": "latest",
"stylelint-order": "latest",
"stylelint-prettier": "latest",
"stylelint-scss": "latest",
"stylelint": "latest",
"prettier": "latest",
"eslint": "latest",
"eslint-config-prettier": "latest",
"eslint-plugin-import": "latest",
"eslint-plugin-prettier": "latest"
}
When I do npm install:
npm WARN [email protected] requires a peer of postcss@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss@>=5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss@>=5.0.0 but none is installed. You must install peer dependencies yourself.
When I do npm list postcss:
@advclb/[email protected] /home/guo/git/advclb/stylelint-config
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── UNMET PEER DEPENDENCY [email protected] deduped
│ ├── UNMET PEER DEPENDENCY [email protected]
│ ├─┬ [email protected]
│ │ └── UNMET PEER DEPENDENCY [email protected] deduped
│ ├─┬ [email protected]
│ │ └── UNMET PEER DEPENDENCY [email protected] deduped
│ ├─┬ [email protected]
│ │ └── UNMET PEER DEPENDENCY [email protected] deduped
│ ├─┬ [email protected]
│ │ └── UNMET PEER DEPENDENCY [email protected] deduped
│ ├─┬ [email protected]
│ │ └── UNMET PEER DEPENDENCY [email protected] deduped
│ └─┬ [email protected]
│ └── UNMET PEER DEPENDENCY [email protected] deduped
└─┬ [email protected]
├── [email protected]
└─┬ [email protected]
└── [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
npm ERR! peer dep missing: postcss@>=5.0.0, required by [email protected]
from vscode-stylelint.
It seemed to be an issue with guocong3000's not maintained (recently) postcss-markdown, if I remember.
If it is, then we can address that in our fork.
from vscode-stylelint.
I had to downgrade to v0.70.0 to fix the problem. It looks like v0.71.0 and later are affected. Removing node_modules
and package-lock.json
, and running npm i
did not fix the problem.
from vscode-stylelint.
Sorry for late reply.
(I'm currently busy with another job and can't contribute much to this project.)
I can't reproduce this issue. Would you share your repository to reproduce the this problem?
(Also include the lock file.)
from vscode-stylelint.
Related Issues (20)
- [Bug]: Not updating settings after editing the config file `.stylelintrc.json` HOT 4
- [Feature]: Update bundled StyleLint to version 15. HOT 1
- [Bug]: ESM-only stylelint plugins fail to import with Yarn PnP HOT 8
- [Feature]: enable markdown in error messages
- [Bug]: Prettier plugins cannot be resolved when package.json is not in the root folder HOT 1
- stylelint slowing down VS Code when saving files HOT 1
- VSCode extension does not respect folder settings! HOT 2
- [Bug]: format can't trigger auto fix HOT 13
- [Feature]: Surface "Error: No rules found within configuration. Have you provided a "rules" property?"
- The JS/TS language service immediately crashed 5 times. The service will not be restarted HOT 1
- CSS properties in comments increase indefinitely. HOT 24
- Fix double slash comments being appended to the nearest property in VSCode HOT 21
- Standardize labels HOT 17
- [Bug]: Sorting properties not work HOT 21
- [Bug]: Formatting is impossible with stylelint HOT 2
- i
- [Bug]: Unsure if extension works with stylelint v16 HOT 2
- Stylelint ignoring stylelint.validate setting
- [Feature]: If you manually specify the configPath path in VScode's stylelint extension, the.stylelintignore file will no longer be recognized, not even the array in the ignoreFiles property of the configuration object
- [Feature]: Use NODE_COMPILE_CACHE when detecting node v22+
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-stylelint.