Bada
Bada's Coding

Bada's Coding

Module not found: Error: Can't resolve './named-references'

Bada's photo
Bada
·Oct 26, 2022·

1 min read

If you make a React app using webpack, you can encounter the error above.

This happens when you include only 'tsx' or 'jsx' in 'extensions' array in the configuration file.

resolve: {
  extensions: ['.tsx'],
},

There are files in 'node_modules' which need 'js' extension. So, if you include it like this,

resolve: {
  extensions: ['.tsx', '.js'],
},

the error will be solved.

 
Share this