theKashey / react-focus-lock

It is a trap! A lock for a Focus. 🔓
MIT License
1.25k stars 65 forks source link

Module Resolution Error: Missing File Extensions in Import Statements #305

Closed digitAI-4N6 closed 2 months ago

digitAI-4N6 commented 2 months ago

Description: When attempting to build a React project using npm install, the following build errors are encountered:

ERROR in ./node_modules/react-focus-lock/dist/es2015/index.js 1:0-38 Module not found: Error: Can't resolve './Combination' in '/path_to_project/node_modules/react-focus-lock/dist/es2015' Did you mean 'Combination.js'? BREAKING CHANGE: The request './Combination' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e.g., a module with JavaScript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.

ERROR in ./node_modules/react-focus-lock/dist/es2015/index.js 2:0-21 Module not found: Error: Can't resolve './UI' in '/path_to_project/node_modules/react-focus-lock/dist/es2015' Did you mean 'UI.js'? BREAKING CHANGE: The request './UI' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e.g., a module with JavaScript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.

Steps to reproduce: Create new react app Run npm install.

theKashey commented 2 months ago

Duplicate of #301 Just downgrade to 2.11.3

digitAI-4N6 commented 2 months ago

Oh, I didn't find that. Thank you.