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

Issue with Module Parsing in Project Using react-multi-crops #1023

Closed
freesaber opened this issue Dec 4, 2023 · 3 comments
Closed

Issue with Module Parsing in Project Using react-multi-crops #1023

freesaber opened this issue Dec 4, 2023 · 3 comments

Comments

@freesaber
Copy link

Description:
Expected Behavior:
I expect my project, which uses react-multi-crops depending on interact.js, to compile without errors. The expected behavior is a successful build where interact.js is properly parsed and integrated.

Actual Behavior:
During the build process, I encounter a module parsing error related to interact.js. The error message is as follows:
ERROR Failed to compile with 1 errors error in ./node_modules/react-multi-crops/node_modules/interactjs/dist/interact.min.js Module parse failed: Unexpected token (3:9939) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. | /* interact.js 1.10.24 | https://raw.github.com/taye/interact.js/main/LICENSE */ |
This error suggests a potential version incompatibility or a module parsing issue with interact.js when used in conjunction with react-multi-crops.

Steps to Reproduce:

Use react-multi-crops in a project.
On building the project (yarn build or equivalent), the aforementioned error occurs.
Potential Cause:
It seems like the issue might be due to react-multi-crops using an older or incompatible version of interact.js. My project's package.json has interact.js set to a specific version (e.g., "1.10.23"), but react-multi-crops has its dependency set with a caret (^) allowing for newer versions, which might be causing the conflict.

System Configuration:

interact.js version: (please specify the version you are using)
Browser name and version: (if applicable)
Operating System: (please specify your operating system)
I have attempted to resolve the issue by specifying different versions of interact.js in my project's package.json, but the issue persists. Any insights or suggestions to resolve this conflict would be greatly appreciated.

@harshalpawshekar-greytip
Copy link

harshalpawshekar-greytip commented Dec 4, 2023

Description:
I expect my project, which uses interact.js, to compile without errors. The expected behavior is a successful build where interact.js is properly parsed and integrated.

Error: ./node_modules/interactjs/dist/interact.min.js 3:9939
Module parse failed: Unexpected token (3:9939)
File was processed with these loaders:
 * ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js
You may need an additional loader to handle the result of these loaders.
| /* interact.js 1.10.24 | https://raw.github.com/taye/interact.js/main/LICENSE */

Steps to Reproduce:

  • delete any existing package-lock.json and node_modules folder
  • run npm i
  • run ng build

Steps to resolve the issue:

  • restore previous package-lock.json file
  • run npm i

System Configuration:
interact.js version: ^1.10.17

I have attempted to resolve the issue by specifying different versions of interact.js in my project's package.json, but the issue persists. Any insights or suggestions to resolve this conflict would be greatly appreciated.

@freesaber
Copy link
Author

package.joson add

"resolutions": {
"interactjs": "1.10.23"
},

@taye
Copy link
Owner

taye commented Dec 4, 2023

Can you make a repo with a demo? I can't reproduce this issue with a new project created with npm init @angular

@taye taye closed this as completed in 3bd1df6 Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants