I am getting the following error while duilding tic-tac-toe game with react. "./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css) Error: Package exports for 'G:\Nodejs\projectReact\tic-tac-toe\node_modules\colorette' do not define a valid '.' target"
2 Answers
5
votes
I faced a similar issue when I had the latest colorette
version installed i.e. 1.2.1
. As per my understanding, this version of colorette
requires Node 14+ while I have Node 13.1. Therefore there are two options to resolve this, either upgrade Node to 14+ version of downgrade colorette
to its previous version 1.2.0
.
I have not tried upgrading Node as it will effect my other projects so I have just downgraded colorette
to 1.2.0 and it works fine for my case by using following commands.
To uninstall colorette:
npm uninstall colorette
To install colorette version 1.2.0:
npm install [email protected]