taye / interact.js

JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers (and also IE9+)
http://interactjs.io/
MIT License
12.19k stars 782 forks source link

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

Closed freesaber closed 7 months ago

freesaber commented 7 months ago

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 commented 7 months ago

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:

Steps to resolve the issue:

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 commented 7 months ago

package.joson add

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

taye commented 7 months ago

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