. Advertisement .
..3..
. Advertisement .
..4..
While running my Reactjs project i get the following error line:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports"
Please give a solution to help me fix the above error!
The cause
The cause of this problem was because i installed the latest version of Node.js (v17.0.1).
Solution
Just go for node.js v14.18.1 and remove the latest version just use the stable version v14.18.1 To uninstall the old version of Node use this command:
In my case, i want to uninstall Node’s latest version 17.0.1 then i would run this command:
Then install the LTS one which is v14.18.1. You just run this command:
And now, your problem is solved!
To fix this error please read the following article:
Tips On Solving The Error: “Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath ‘./lib/tokenize’ is not defined by “exports””