Open yijiasu opened 4 years ago
Hey @yijiasu , thanks for reporting !
Not sure exactly how private scoped packages work, but I'm not sure the problem is that module-alias
is trying to load @org/utility as an alias. Unless you have @org
as an alias as well, which might conflict. Using @
for aliasing is just an example, you could use $$$
instead, it would make no difference to module-alias.
Would you mind sharing your package.json
? Even better would be a git repo with everything needed to reproduce the problem.
Also, which version of node are you using ?
I am getting an issue when using
module-alias
with some private npm scoped packages.For example, given we have defined
_moduleAliases
configuration inpackage.json
, it works well without any private scoped packages (which also has a name starts with@
sign).If I import any scoped packages (in my case, the name is
@org/utility
), we will run into a issue like this:It looks like
module-alias
try to resolve this package as an alias definition while actually it's not. If I manuallyrequire
package withoutmodule-alias
hooked, everything works well again.