Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants