Giter VIP home page Giter VIP logo

Comments (11)

guoyunhe avatar guoyunhe commented on June 5, 2024 3

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.

urbantrout avatar urbantrout commented on June 5, 2024 2

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:

  1. Uninstall prettier-stylelint
    npm rm prettier-stylelint
    Don't know why I installed this, but this package seems to install an older version of postcss-html.
  2. 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.

jeddy3 avatar jeddy3 commented on June 5, 2024 1

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.

ACVis avatar ACVis commented on June 5, 2024 1

I'll check when I have access to that laptop again, next week.

from vscode-stylelint.

ACVis avatar ACVis commented on June 5, 2024 1

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.

urbantrout avatar urbantrout commented on June 5, 2024 1

I am still getting this error. Any update on this?

from vscode-stylelint.

jeddy3 avatar jeddy3 commented on June 5, 2024

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.

guoyunhe avatar guoyunhe commented on June 5, 2024

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.

jeddy3 avatar jeddy3 commented on June 5, 2024

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.

kylebolstad avatar kylebolstad commented on June 5, 2024

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.

ota-meshi avatar ota-meshi commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.