csstools / postcss-normalize

Use the parts of normalize.css (or sanitize.css) you need from your browserslist
Creative Commons Zero v1.0 Universal
816 stars 40 forks source link

Feature/postcss 8 #53

Closed devpeerapong closed 3 years ago

devpeerapong commented 3 years ago

This pull request upgrade to postcss@8

The test will fail because the current version of postcss-browser-comments still use postcss@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/5 create-react-app cannot upgrade to postcss@8 https://github.com/facebook/create-react-app/issues/9664

gitKrystan commented 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"
    // ...
  },
}
devpeerapong commented 3 years ago

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

await-ovo commented 3 years ago

any updates on this

radiosilence commented 3 years ago

@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.

jonathantneal commented 3 years ago

Hi @radiosilence, thanks for the ping. I’m hoping I get through my workload well enough today that I can pick this up tonight.

radiosilence commented 3 years ago

@jonathantneal amazing, thanks mate! Just need a version bump on this project really and then I think CRA can update and everything is golden