create-react-app
create-react-app copied to clipboard
Module not found: Error: Can't resolve 'path'
I have upgraded an application from react 17 to react 18 and now using "react-scripts 5.0.1" . Now npm build throwing error
I would like to know how to include polyfill when using create-react-app .
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Webpack configuration
Environment
Node 14.16.1
Expected behavior
Should build without any error.
Actual behavior
npm run build throwing error "Module not found: Error: Can't resolve 'path'".
Looks similar to this issue: https://github.com/facebook/create-react-app/issues/11756
@SunilPrasad please do let me know, if your issue is resolved ? if yes update your comments here.
@Saketh-Reddy Why would the issue be resolved? As noted on #11756 , this is a frustrating issue that requires hacks to workaround. A few of the recent comments sum it up: https://github.com/facebook/create-react-app/issues/11756#issuecomment-1218757584
Without a recommended path for resolving this issue, many people will not upgrade to CRA5.