Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stylelint error when use the stylelint-config-recommended-scss and stylelint-config-recommended-vue #18

Closed
baiyonghong1989 opened this issue Dec 9, 2021 · 1 comment

Comments

@baiyonghong1989
Copy link

baiyonghong1989 commented Dec 9, 2021

I'm using stylelint to configure my vue project. To identify style scss in the vue file, I introduced stylelint-config-recommended-scss and stylelint-config-recommended-vue.
my package version below:

     "stylelint": "^14.1.0",
    "stylelint-config-prettier": "^9.0.3",
    "stylelint-config-recess-order": "^3.0.0",
    "stylelint-config-recommended-scss": "^5.0.2",
    "stylelint-config-recommended-vue": "^1.1.0",
    "stylelint-prettier": "^2.0.0",

my stylelint config:

extends: 'stylelint-config-recommended-vue/scss',

when i run scritp:
npx stylelint src/**/*.vue, an error occured:

TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (D:\wallkit\H5\WalletKitFront\node_modules\postcss-scss\lib\nested-declaration.js:3:33)
    at Module._compile (D:\wallkit\H5\WalletKitFront\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (D:\wallkit\H5\WalletKitFront\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
    at Object.<anonymous> (D:\wallkit\H5\WalletKitFront\node_modules\postcss-scss\lib\scss-parser.js:4:25)
    at Module._compile (D:\wallkit\H5\WalletKitFront\node_modules\v8-compile-cache\v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)

pls help

@ota-meshi
Copy link
Owner

Your log is similar to the next issue.
ota-meshi/postcss-html#29

I think that it will be solved by explicitly installing postcss@^8.

npm install -D postcss@^8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants