question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed build - Css Minimizer

See original GitHub issue

Recently I started having these errors during build.

Local

Css Minimizer Plugin: postcss-svgo:
/Users/admin/Desktop/Projects/*/*/styles.0316d89035a****b0edf.css:154:5: Error:
Plugin name should be specified

Netlify

12:04:13 PM: failed Building production JavaScript and CSS bundles - 269.826s
12:04:13 PM: error Generating JavaScript bundles failed
12:04:13 PM: styles.0316d89035a****b0edf.css from Css Minimizer
12:04:13 PM: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './plugins/names' is not defined by "exports" in /opt/build/repo/node_modules/colord/package.json
12:04:13 PM:     at applyExports (internal/modules/cjs/loader.js:491:9)
12:04:13 PM:     at resolveExports (internal/modules/cjs/loader.js:507:23)
12:04:13 PM:     at Function.Module._findPath (internal/modules/cjs/loader.js:635:31)
12:04:13 PM:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
12:04:13 PM:     at Function.Module._load (internal/modules/cjs/loader.js:842:27)
12:04:13 PM:     at Module.require (internal/modules/cjs/loader.js:1026:19)
12:04:13 PM:     at require (internal/modules/cjs/helpers.js:72:18)
12:04:13 PM:     at Object.<anonymous> (/opt/build/repo/node_modules/postcss-colormin/dist/colours.js:10:37)
12:04:13 PM:     at Module._compile (internal/modules/cjs/loader.js:1138:30)
12:04:13 PM:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)

Edit: I was able to solve this issue in Netlify by changing the Node version in the settings to Node 16. You can do this by adding the following environment variable in Netlify. NODE_VERSION 16

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
LekoArtscommented, May 25, 2021

This was an upstream issue in https://github.com/omgovich/colord/issues/51 - updating your dependencies so that you get colord@^1.7.2 installed should fix your issue.

2reactions
Bartmrcommented, May 24, 2021

@vladar Just use the most recent Gatsby version with gatsby-plugin-sass and node-sass 6. I’m having the same issue here

Read more comments on GitHub >

github_iconTop Results From Across the Web

from Css Minimizer, Transform failer with 1 error, Invalid version
I have just found this issue after I update my project from Angular 11 to 12 and run it with the comman ng...
Read more >
can't run yarn build get issue from Css Minimizer plugin Error ...
Failed to compile. static/css/main.a6b5f62b.css from Css Minimizer plugin. Error: Cannot find module 'normalize-url' Require stack:.
Read more >
CSS Minimizer error when building react js app - Reddit
I got the following error after updating react-scripts. static/css/main.57ddad44.css from Css Minimizer plugin Error: Unexpected '/'.
Read more >
css-minimizer-webpack-plugin - npm
cssnano plugin for Webpack. Latest version: 4.2.2, last published: 2 months ago. Start using css-minimizer-webpack-plugin in your project by ...
Read more >
CssMinimizerWebpackPlugin | webpack
To begin, you'll need to install css-minimizer-webpack-plugin : ... Use source maps to map error message locations to modules (this slows down the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found