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

auto-install does not seem to work with npm packages with dots in their name #77

Closed
Fenntasy opened this issue Mar 16, 2016 · 2 comments

Comments

@Fenntasy
Copy link

for instance

import times from 'lodash.times'

will not attempt to install lodash.times and so will trigger an error with webpack

ERROR in ./src/App.js
Module not found: Error: Cannot resolve module 'lodash.times' in ...

I assume this is due to the dot in the name of the package and not a problem with this specific package (I tried with lodash.random and lodash.times with the same result but I don't know other packages that uses the dot in the name).

@Fenntasy
Copy link
Author

I was just researching on my own but you're quick :p

It doesn't work with v3 of the plugin? I'm not sure how to test it on my own but the match query from the v3:

var matches = /Cannot resolve module '([@\w\/\.-]+)' in/.exec(err);

should work with period (I tested the regex).

@insin
Copy link
Owner

insin commented Mar 16, 2016

There's another check in installer.js which modules with periods in their names won't pass.

@insin insin closed this as completed in 0486325 May 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants