Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React: Module not found: Error: Can't resolve... #3

Closed
OvidijusParsiunas opened this issue Mar 16, 2023 · 1 comment
Closed

React: Module not found: Error: Can't resolve... #3

OvidijusParsiunas opened this issue Mar 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@OvidijusParsiunas
Copy link
Owner

OvidijusParsiunas commented Mar 16, 2023

This thread is used to troubleshoot an es6 module resolve compilation error that appears to affect some apps when using the react package active-table-react. The error bears some of the following syntax:

Module not found: Error: Can't resolve './utils/outerTableComponents/pagination/paginationInternalUtils' in '/Users/ovidijusparsiunas/Desktop/sample-projects/my-app/node_modules/active-table/dist' Did you mean 'paginationInternalUtils.js'? BREAKING CHANGE: The request './utils/outerTableComponents/pagination/paginationInternalUtils' 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.

Screenshot 2023-03-16 at 17 30 32

@OvidijusParsiunas OvidijusParsiunas added the bug Something isn't working label Mar 16, 2023
@OvidijusParsiunas OvidijusParsiunas self-assigned this Mar 16, 2023
@OvidijusParsiunas
Copy link
Owner Author

This issue can be fixed by using one of the following approaches:

  1. Changing the react-scripts package version to 4.0.3. Reference.

  2. Adding the following to your webpack configuration (References: [1,2,3]):

{
  test: /\.m?js/,
  type: "javascript/auto",
},
{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false,
  },
},

If you are still having this problem or have found an alternative solution, please comment below. If you are experiencing a different problem please create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant