Ankita
Ankita

Reputation: 41

Error found while developing games with react

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"

Upvotes: 3

Views: 2129

Answers (2)

jokermt235
jokermt235

Reputation: 476

Had the same problem when using node v 13.1.x upgrade it to 14.x helped so far using command : sudo n latest

Upvotes: 0

Umair Malhi
Umair Malhi

Reputation: 585

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]

Upvotes: 5

Related Questions