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
ERR_PACKAGE_PATH_NOT_EXPORTED error from colord #51
Comments
Just saw that v1.7.1 shipped about two hours ago, which is when everything broke for me. |
Hi! Will do my best to help you. What bundler (Webpack, rollup, or another) do you use to build your app? |
I'm using Webpack in a Gatsby app. Much appreciated! |
What dependency pulls Colord in your project? cssnano? |
The problem seems to originate with |
Just installed Gatsby and with "gatsby-plugin-postcss" enabled and "npm run build" works well. P.S. What Node.js version do you have? |
I'm on 12.19 locally, then I believe it's 14 in the Codebuild job (both are failing) |
Looks like this may be an issue with cssnano? I just came across this: cssnano/cssnano#1110 |
Could you please share with me your Gatsby project config? Especially the things related to CSS bundling. |
The repo is private, but here's my // ./package.json
{
"name": "stackery-io",
"scripts": {
"develop": "gatsby develop",
"build": "gatsby build",
"serve": "gatsby serve",
"clean": "rm -rf public && rm -rf .cache",
"format-output": "prettier src/**/*.{js,jsx}",
"format": "prettier --write src/**/*.{js,jsx}",
"lint-errors": "eslint src/**/*.{js,jsx} --quiet",
"lint": "eslint src/**/*.{js,jsx}",
"start": "npm run develop",
"test": "eslint . --quiet && cy:run",
"cy:open": "cypress open --project ./functions/VerificationTests/ --config-file cypress.json",
"cy:run": "cypress run --project ./functions/VerificationTests/ --config-file cypress.json",
"test:e2e": "start-server-and-test develop http://localhost:8000 cy:open"
},
"dependencies": {
"@babel/core": "^7.14.3",
"@deckdeckgo/highlight-code": "^2.6.0",
"@emotion/babel-plugin": "^11.3.0",
"@emotion/eslint-plugin": "^11.2.0",
"@emotion/react": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@material-ui/core": "^4.11.4",
"@material-ui/icons": "^4.11.2",
"@raae/gatsby-remark-oembed": "^0.1.1",
"@styled-icons/fa-brands": "^10.26.0",
"@styled-icons/fa-solid": "^10.32.0",
"algoliasearch": "^4.8.6",
"amazon-cognito-identity-js": "^5.0.1",
"babel-plugin-emotion": "^11.0.0",
"babel-plugin-styled-components": "^1.12.0",
"bootstrap": "^5.0.1",
"colord": "1.7.0",
"crypto-browserify": "^3.12.0",
"dayjs": "^1.10.4",
"dotenv": "9.0.2",
"gatsby": "^3.5.0",
"gatsby-cli": "^3.5.0",
"gatsby-image": "^3.5.0",
"gatsby-plugin-algolia": "^0.17.0",
"gatsby-plugin-anchor-links": "^1.2.1",
"gatsby-plugin-breakpoints": "^1.3.3",
"gatsby-plugin-catch-links": "^3.5.0",
"gatsby-plugin-csp": "^1.1.3",
"gatsby-plugin-emotion": "^6.5.0",
"gatsby-plugin-feed": "^3.5.0",
"gatsby-plugin-gdpr-cookies": "^2.0.0",
"gatsby-plugin-google-analytics": "^3.5.0",
"gatsby-plugin-google-fonts": "^1.0.1",
"gatsby-plugin-google-tagmanager": "^3.5.0",
"gatsby-plugin-manifest": "^3.5.0",
"gatsby-plugin-nprogress": "^3.5.0",
"gatsby-plugin-offline": "^4.5.1",
"gatsby-plugin-react-helmet": "^4.5.0",
"gatsby-plugin-robots-txt": "^1.6.2",
"gatsby-plugin-rollbar": "^1.1.0",
"gatsby-plugin-sass": "^4.5.0",
"gatsby-plugin-sharp": "^3.5.0",
"gatsby-plugin-sitemap": "^4.1.0",
"gatsby-plugin-smoothscroll": "^1.2.0",
"gatsby-plugin-styled-components": "^4.5.0",
"gatsby-plugin-typography": "^3.5.0",
"gatsby-remark-classes": "^1.0.0",
"gatsby-remark-copy-linked-files": "^4.2.1",
"gatsby-remark-embed-video": "^3.1.1",
"gatsby-remark-highlight-code": "^2.2.1",
"gatsby-remark-images": "^5.2.1",
"gatsby-remark-prismjs": "^5.2.1",
"gatsby-remark-reading-time": "^1.1.0",
"gatsby-remark-responsive-iframe": "^4.2.1",
"gatsby-source-filesystem": "^3.5.0",
"gatsby-source-graphql": "^3.5.0",
"gatsby-theme-material-ui": "^2.0.1",
"gatsby-transformer-remark": "^4.2.0",
"gatsby-transformer-sharp": "^3.5.0",
"install": "^0.13.0",
"jquery": "^3.6.0",
"lodash": "^4.17.21",
"mdb-react-ui-kit": "^1.0.0-beta5",
"mdbreact": "^5.0.2",
"normalize.css": "^8.0.1",
"popper.js": "^1.16.1",
"prismjs": "^1.23.0",
"prop-types": "^15.7.2",
"query-string": "^7.0.0",
"react": "^17.0.2",
"react-bootstrap": "^1.6.0",
"react-cookie-consent": "^6.2.3",
"react-device-detect": "^1.17.0",
"react-dom": "^17.0.2",
"react-headroom": "^3.1.1",
"react-helmet": "^6.1.0",
"react-instantsearch-dom": "^6.11.0",
"react-select": "^4.3.1",
"react-typist": "^2.0.5",
"react-typography": "^0.16.20",
"remarkable": "^2.0.1",
"smooth-scroll": "^16.1.3",
"stream-browserify": "^3.0.0",
"styled-components": "^5.3.0",
"typography": "^0.16.21"
},
"devDependencies": {
"@types/remarkable": "^2.0.1",
"axe-core": "^4.2.1",
"babel-eslint": "^10.1.0",
"cypress": "^7.3.0",
"cypress-axe": "^0.12.2",
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-import": "^2.23.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-webpack-plugin": "^2.5.4",
"gatsby-plugin-eslint": "^3.0.0",
"lighthouse": "^7.5.0",
"prettier": "^2.3.0",
"semistandard": "^16.0.0",
"start-server-and-test": "^1.12.2"
}
}
|
This is my project configuration.
|
Thx! Do you have any CSS-related settings in the "gatsby-config.js"? |
I don't have any CSS-related settings, but I am using these theming packages: gatsby-plugin-emotion
gatsby-plugin-typography
gatsby-plugin-styled-components
gatsby-plugin-google-fonts Here's everything that uses postcss-colormin AFAIK: gatsby-plugin-webfonts
cssnano-preset-default But those aren't in my gatsby-config. and from my package-lock: "postcss-colormin": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.1.0.tgz",
"integrity": "sha512-5s+VNfQ5CsR6yvBc6Tc8NK9cxb/c8sA547zy+8ofL04gs/GygmOcVZt2s6jJn7TvntAw0Bp6MDpq4bd51EPwdw==",
"requires": {
"browserslist": "^4.16.0",
"colord": "^1.7.0",
"postcss-value-parser": "^4.1.0"
} |
Released v1.7.2 with a simplified exports map. I assume that your bundler/loader can't process wildcarted subfolder exports, so I defined all of them manually. Could you update |
To perform a quick test, you can run |
Tested in Next.js and Parcel. Works well |
Awesome, thanks so much for the quick fix! I'll start my builds again and let you know how it goes. |
Tested inside Webpack-based project and in Node.js backend app as well. No errors, works as expected. Really hope that everything is fine in your apps too. |
That worked, and our build is unblocked. Thanks again for the quick turnaround! |
Thanks for helping me here and good luck with your projects! |
I got the exact same issue about the same time as @bildungsroman. Thanks @omgovich! Your workaround did the trick. You saved me a lot of headache. |
I'm unable to build my app due to an error coming from a dependency that relies on Colord. Any help with this would be appreciated!
When running
npm run build
, I get the following error:The text was updated successfully, but these errors were encountered: