MarvelousSoftware / marvelous-aurelia-grid

The marvelous-aurelia-grid is an open source, modern and powerful grid component based on aurelia framework.
http://marvelous.software/docs.html#/grid
MIT License
9 stars 2 forks source link

Webpack - Cannot resolve module 'marvelous-aurelia-core/*' #6

Open LazerFX opened 8 years ago

LazerFX commented 8 years ago

When the project is run via WebPack, there are a series of errors generated:

Cannot resolve module 'marvelous-aurelia-core/utlis' Cannot resolve module 'marvelous-aurelia-core/aureliaUtils' Cannot resolve module 'marvelous-aurelia-core/optionsReader' Cannot resolve module 'marvelous-aurelia-core/pubsub' Cannot resolve module 'marvelous-aurelia-core/compiler'

These appear to be down to the differences in module resolution and location between WebPack and SystemJS (As used by JSPM).

@PWKad - have you experience with this, and resolving it?

It's very easy to reproduce - if you open the main Aurelia WebPack skeleton project, and run the following commands, it'll show you the errors:

npm install marveloussoftware/marvelous-aurelia-core --save
npm install marveloussoftware/marvelous-aurelia-query-language --save
npm intsall marveloussoftware/marvelous-aurelia-grid --save

webpack -v

(The webpack -v shows verbose errors, so you can see why and where it failed - in this case, trying to find modules that don't exist).

damiankaminski commented 8 years ago

Did you try to use any other library, preferably some which is already proven to be working on Webpack? Maybe it is just a WebPack configuration issue?

LazerFX commented 8 years ago

Yeah, we've got quite a complex set of build-tooling on this project. Other libraries work.

I've managed to get those to load by aliasing them, however then the actual functionality fails... I'm going to put together a repro against the basic Aurelia Skeleton, get it as far as I can and hopefully someone can figure out where the actual issue lies. Thanks for the help on this!

damiankaminski commented 8 years ago

I'll try to fix it later today or tomorrow, but since I never used WebPack then I cannot make any promises.

LazerFX commented 8 years ago

I appreicate it - I've been on quite a learning curve with the WebPack environment too :D

LazerFX commented 8 years ago

I've created a fork. It's got two tags:

Again, I'm definitely not a WebPack expert, so aliasing may be the wrong thing to do, but it resolve the first batch of errors, so it seemed right.

corneliutusnea commented 8 years ago

This issue is similar to https://github.com/aurelia/dialog/issues/127. It looks like the imports for css are not compatible with WebPack.

don-bluelinegrid commented 8 years ago

I have a similar issue, after following the installation instructions:

webpack-dev-server.js:3 ./~/marvelous-aurelia-grid/dist/commonjs/grid/column.js Module not found: Error: Can't resolve 'marvelous-aurelia-core/utils' in '/Users/donpeterkofsky/Documents/gc-2-dev/node_modules/marvelous-aurelia-grid/dist/commonjs/grid' resolve 'marvelous-aurelia-core/utils' in '/Users/donpeterkofsky/Documents/gc-2-dev/node_modules/marvelous-aurelia-grid/dist/commonjs/grid' Parsed request is a module using description file: /Users/donpeterkofsky/Documents/gc-2-dev/node_modules/marvelous-aurelia-grid/package.json (relative path: ./dist/commonjs/grid) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/donpeterkofsky/Documents/gc-2-dev/node_modules/marvelous-aurelia-grid/package.json (relative path: ./dist/commonjs/grid) resolve as module /Users/donpeterkofsky/Documents/gc-2-dev/node_modules/node_modules doesn't exist or is not a directory /Users/donpeterkofsky/Documents/node_modules doesn't exist or is not a directory /Users/donpeterkofsky/node_modules doesn't exist or is not a directory /Users/node_modules doesn't exist or is not a directory /node_modules doesn't exist or is not a directory

Seems like there are some hard-coded bad paths to node_modules - it is looking everywhere except in the actual project directory.