-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
"TypeError: atVariables is not a function" with v0.2.0. #204
Comments
@ehoogeveen What version of postcss are you using? |
I tested with postcss version 8.1.7 and pocstcss-cli version 8.2.0, on Windows. |
Can you give an example or link where you get the error? |
I just upgraded to 0.2.0 and had exactly the same issue. I'm using in conjunction with |
That would be great, thanks. I've been meaning to make a test case but our setup is a bit arcane. |
I've faced with a similar in AlexWayfer/flame-cli#57 (I'm trying to replace SCSS with PostCSS completely, so it's not quite this PR, but based on it).
My configuration: // postcss.config.js
module.exports = {
plugins: [
// there can be more, but it's reproducible only with this package
require('postcss-at-rules-variables')({ atRules: ['media'] })
]
}
"dependencies": {
"@babel/core": "*",
"@babel/plugin-transform-object-assign": "*",
"@babel/preset-env": "*",
"@rollup/plugin-babel": "*",
"@rollup/plugin-commonjs": "*",
"@rollup/plugin-json": "*",
"@rollup/plugin-node-resolve": "*",
"autoprefixer": "*",
"postcss-at-rules-variables": "*",
"postcss-cli": "*",
"postcss-flexbugs-fixes": "*",
"postcss-mixins": "*",
"postcss-nested": "*",
"promise-polyfill": "*",
"rollup": "*",
"sass": "*",
"simplify-js": "*",
"whatwg-fetch": "*"
},
...
"scripts": {
"build:styles": "postcss assets/styles/ -d public/styles/ --base assets/styles/ --ext=css",
...
} With version lock like this:
there is no such error. |
But it locks PostCSS at version 7, and other dependent packages too. |
Describe the configuration OS, nodejs ? |
Arch Linux, Node.js 15.1.0 I found simpler project: https://github.com/AlexWayfer/alexwayfer.name |
@ehoogeveen @spacedawwwg @AlexWayfer I made a small fix, please update the package. Let me know if it doesn't work for you. do not hesitate to reopen the problem if your problem is not solved |
Problem seems to be fixed for me, thanks! |
Confirm, see no problems anymore, thank you. |
Node.js
version:v14.15.0 LTS
postcss-at-rules-variables
version:v0.2.0
After updating to the new version I get the error
TypeError: atVariables is not a function
.It appears that
require('postcss-at-rules-variables')
now returns an object ({ default: [Function: _default], postcss: true}
) where other plugins return a function ([Function (anonymous)] { postcss: true }
).I can work around the problem by using
atVariables['default']()
instead, but I'm not sure what the side effects of that are, if any.The text was updated successfully, but these errors were encountered: