marionettejs / marionette-integrations

A collection of starter kits for building Marionette Applications
118 stars 114 forks source link

webpack.config.js modulesDirectories issue #30

Closed lvv83 closed 8 years ago

lvv83 commented 8 years ago

Hello.

I try use integration with webpack. During build process I got next error:

ERROR in ./~/backbone.marionette/lib/backbone.marionette.js Module not found: Error: Cannot resolve module 'backbone.radio' in C:\data\coding\mjs\node_modules\backbone.marionette\lib @ ./~/backbone.marionette/lib/backbone.marionette.js 12:133-158

After some researching I found this line in webpack.config.js

 resolve: {
   modulesDirectories: [path.join(__dirname, './node_modules')],
   root: path.join(__dirname, './app')
  }

Webpack documentation says that

Just use a directory name, not a path. Use only if you expect to have a hierarchy within these folders

Then I deleted modulesDirectories property, and after this build the project with success

denar90 commented 8 years ago

Looks like missed backbone.radio in dependencies.

denar90 commented 8 years ago

@lvv83 which version of node are you using?

lvv83 commented 8 years ago

Node version 4.4.4 OS: Windows 10 NPM version 2.15.1

denar90 commented 8 years ago

with node v6 it looks fine.... @lvv83 would you like to open PR with your changes?

lvv83 commented 8 years ago

Please, see PR #32 I just tested it with Node 6.4.0 - no problems