Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack cannot resolve module #403

Open
stratdaz opened this issue Feb 4, 2016 · 3 comments · May be fixed by #497
Open

Webpack cannot resolve module #403

stratdaz opened this issue Feb 4, 2016 · 3 comments · May be fixed by #497

Comments

@stratdaz
Copy link

stratdaz commented Feb 4, 2016

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?

@peterbartels
Copy link

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');

@stratdaz
Copy link
Author

stratdaz commented Feb 4, 2016

Thanks, that looks more promising.

@pgrm pgrm linked a pull request Dec 13, 2016 that will close this issue
@mindej
Copy link

mindej commented Jun 20, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants