Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

autoprefixer breaks fresh nuxt.js #1353

Closed
kalnode opened this issue Aug 16, 2020 · 2 comments
Closed

autoprefixer breaks fresh nuxt.js #1353

kalnode opened this issue Aug 16, 2020 · 2 comments

Comments

@kalnode
Copy link

kalnode commented Aug 16, 2020

With a fresh install of nuxt.js (via create-nuxt-app), npm run dev fails with an error:

ERROR No valid exports main found for '/myProject/node_modules/autoprefixer/node_modules/colorette'

To get around this (and continue work), the error is cleared by simply moving-or-deleting this folder:

node_modules/autoprefixer/node_modules/colorette

Tried with node 14.0.0, 14.0.5 and 14.8.0; same results all round.

@ai
Copy link
Member

ai commented Aug 16, 2020

Could open node_modules/autoprefixer/lib/autoprefixer.js and put this code to the first line:

console.log(process.versions);

Start Nuxt.js with Node.js 14 and show me output.

@kalnode
Copy link
Author

kalnode commented Aug 17, 2020

Thanks for this clue!

So turns out for the project there was a specific older version of node (13.5.0) in use, even though node -v was reporting 14.8.0; I should use console.log(process.versions) more often.

I set nvm use 14.8.0, deleted the root node_modules dir, and ran npm install again. Everything is fine now.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants