Hey there,
I decided, after reading Mathew James Davis’s article on Interact, I would explore this drag and drop functionality. Whilst reading the comments I picked up on Eric Lieben’s npm module that was spun off Mathew’s blog. I decided to install this option.
So I set up a CLI bare bones just for this purpose and this worked fine.
I then tried to add Aurelia-Interactjs and ran into a problem which had a few problems with the post script… had to manually install a dependency. However I have this now installed and all is now included.
The docs for this module say to add this line: “.plugin(‘aurelia-interactjs’);”
I instead added this: “.plugin(PLATFORM.moduleName(‘aurelia-interactjs’))” as this was indicated etc with CLI
I duly go to run the project and even though the node-modules directory has aurelia-interactjs and interactjs I get the following errors:
ERROR in ./node_modules/aurelia-interactjs/dist/amd/index.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/index.js 1:0-29:2
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
ERROR in ./node_modules/aurelia-interactjs/dist/amd/draggable.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/draggable.js 15:0-48:2
@ ./node_modules/aurelia-interactjs/dist/amd/index.js
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
ERROR in ./node_modules/aurelia-interactjs/dist/amd/interact-draggable.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/interact-draggable.js 15:0-39:2
@ ./node_modules/aurelia-interactjs/dist/amd/index.js
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
ERROR in ./node_modules/aurelia-interactjs/dist/amd/dropzone.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/dropzone.js 15:0-63:2
@ ./node_modules/aurelia-interactjs/dist/amd/index.js
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
ERROR in ./node_modules/aurelia-interactjs/dist/amd/interact-dropzone.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/interact-dropzone.js 15:0-40:2
@ ./node_modules/aurelia-interactjs/dist/amd/index.js
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
ERROR in ./node_modules/aurelia-interactjs/dist/amd/interact-gesturable.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/interact-gesturable.js 15:0-38:2
@ ./node_modules/aurelia-interactjs/dist/amd/index.js
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
ERROR in ./node_modules/aurelia-interactjs/dist/amd/interact-resizable.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/interact-resizable.js 15:0-39:2
@ ./node_modules/aurelia-interactjs/dist/amd/index.js
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
ERROR in ./node_modules/aurelia-interactjs/dist/amd/resizable.js
Module not found: Error: Can’t resolve ‘interact’ in ‘C:\AURELIA\SANDBOX\CLI-Drag-and-Drop-TEST\Interact\node_modules\aurelia-interactjs\dist\amd’
@ ./node_modules/aurelia-interactjs/dist/amd/resizable.js 15:0-58:2
@ ./node_modules/aurelia-interactjs/dist/amd/index.js
@ ./src/main.ts
@ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry webpack-dev-server/client aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
I did check in the node-modules directory to see if they were there and they are… Any ideas?
Simon