Fix: Error: Cannot find module ‘caniuse-lite/data/features/css-unicode-bidi’

Recently if you are working on nextjs Project and using caniuse-lite version 1.0.30001394 then you must be facing the below error:

Error snippet:

Cannot find module 'caniuse-lite/data/features/css-unicode-bidi'

Issue is because of caniuse-lite version v1.0.30001394 and have been fixed by technical team into version v1.0.30001397.

To fix the error, update the caniuse-lite version to the latest release using command ‘npm install caniuse-lite@1.0.30001397’ and Error: Cannot find module ‘caniuse-lite/data/features/css-unicode-bidi’ would be fixed.

Command to update the caniuse-lite to latest version:

npm install caniuse-lite@1.0.30001397

Or alternatively you can downgrade the caniuse-lite version to 1.0.30001390 using command ‘npm install caniuse-lite@1.0.30001390’ to fix the error.

npm install caniuse-lite@1.0.30001390

Once caniuse-lite is either upgraded to the recent version 1.0.30001397 or downgraded to stable version 1.0.30001390, error would be fixed.