Closed devpeerapong closed 3 years ago
Trying this PR in our app. Ran into this error:
Could not require 'ember-cli-build.js': Cannot find module '...node_modules/postcss-normalize/dist/index.cjs.js'. Please verify that the package.json has a valid "main" entry
I can't be totally sure the error is from this package because there are so many packages that are seemingly having trouble with postcss 8. Here are the relevant parts of our package.json:
{
"devDependencies": {
"@csstools/postcss-sass": "jonathantneal/postcss-sass#pull/26/head",
"ember-cli-postcss": "^7.0.0",
"postcss": "^8.2.8",
"postcss-clean": "leodido/postcss-clean#release/2.x",
"postcss-normalize": "csstools/postcss-normalize#pull/53/head",
"postcss-scss": "^3.0.5",
// ...
},
"resolutions": {
"postcss-browser-comments": "csstools/postcss-browser-comments#pull/4/head"
// ...
},
}
I think this happens because when you specify dependencies via Git Repository. The package manager (npm or yarn) just download the source code from that repository, which in this case does not contain the build file.
I suggest that you clone the repository, run build locally and npm link
or yarn link
on both postcss-normalize
and postcss-browsers-comment
any updates on this
@devpeerapong
I added a fork incase the package was totally dead, but then I realised that they were both owned by @jonathantneal so we'd either have to go further up the chain and fork this package too, or wait for him to merge/release.
Also I think the tests need updating, too.
Hi @radiosilence, thanks for the ping. I’m hoping I get through my workload well enough today that I can pick this up tonight.
@jonathantneal amazing, thanks mate! Just need a version bump on this project really and then I think CRA can update and everything is golden
This pull request upgrade to
postcss@8
The test will fail because the current version of
postcss-browser-comments
still usepostcss@7
should be merged after https://github.com/csstools/postcss-browser-comments/pull/4
Related Issue
postcss-browser-comments
https://github.com/csstools/postcss-browser-comments/issues/5create-react-app
cannot upgrade topostcss@8
https://github.com/facebook/create-react-app/issues/9664