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.38k stars 785 forks source link

404 errors loading resource files for 1.3.0+ using SystemJS #551

Closed jrigsby closed 7 years ago

jrigsby commented 7 years ago

I have an aurelia project built in Visual Studio and Typescript using SystemJS to load modules installed via jspm.

I ran "jspm install npm:interactjs --edge" to get the latest unstable version to pick up a change for iOS issues and when I try to run the project I get 404 errors. It finds interact.js fine in the dist folder but its trying to load resources files from a src folder inside the dist folder which is not present. I see all the references are relative to the current folder where interact.js is located. The src folder where I see all the files is a sibling of dist.

I dont particularly know why its looking in dist other than a reference to it in package.json or maybe thats just how systemjs rolls. Just following it from config.js I would have expected it to go to index.js and then off to the src folder.

I thought it might be that jspm doesnt execute build processes for npm so I installed it using npm "npm install interactjs@next" and I dont see any differences in the file structure though there are differences in files themselves such as package.json.

I didnt have to do this with 1.2.9, everything worked fine with respect to loading files and using jspm to install though I see 1.2.9 doesn't reference resource files while the 1.3.0 does.

It is suggested to use this version to fix issue 284, which is what my logs are saying is happening to our test users. I cannot duplicate 284 personally. I suspect an iOS test user is causing the errors so Im hoping to use 1.3 to get a fix, blind.

taye commented 7 years ago

jspm was trying to resolve require statements in the dist/interact.js bundle. I've set jspm.main to "index" in package.json and published a new version to npm.