angular-multi-select icon indicating copy to clipboard operation
angular-multi-select copied to clipboard

Webpack cannot resolve module

Open stratdaz opened this issue 9 years ago • 3 comments

After installing the module, Webpack is giving this error when I run "webpack --display-error-details" ...

ERROR in ./app/user/module.js Module not found: Error: Cannot resolve module 'isteven-angular-multiselect' in F:\Development\Apps\Solutions\Necto\Necto.Webpack\app\user resolve module isteven-angular-multiselect in F:\Development\Apps\Solutions\Necto\Necto.Webpack\app\user looking for modules in F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules resolve 'file' isteven-angular-multiselect in F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules resolve file F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.webpack.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.web.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect is not a file F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.json doesn't exist resolve 'file' or 'directory' F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect resolve file F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect is not a file F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.webpack.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.web.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.json doesn't exist resolve directory directory default file index resolve file index in F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.webpack.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.web.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.js doesn't exist F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.json doesn't exist [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.webpack.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.web.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.webpack.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.web.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.json] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect.json] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.webpack.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.web.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.js] [F:\Development\Apps\Solutions\Necto\Necto.Webpack\node_modules\isteven-angular-multiselect\index.json] @ ./app/user/module.js 1:0-24:6

Seems like package.json is valid but Webpack is not looking there?

stratdaz avatar Feb 04 '16 06:02 stratdaz

package.json is not valid it contains two entries (css and js) instead of just one. workaround: require('isteven-angular-multiselect/isteven-multi-select.js');

peterbartels avatar Feb 04 '16 12:02 peterbartels

Thanks, that looks more promising.

stratdaz avatar Feb 04 '16 13:02 stratdaz

@peterbartels This will include js file in app. I want to include it in a vendor bundle it will not work.

mindej avatar Jun 20 '17 12:06 mindej