christianalfoni / webpack-bin

A webpack code sandbox
http://www.webpackbin.com
MIT License
710 stars 75 forks source link

fails to load namespaced package #145

Open joaomilho opened 8 years ago

joaomilho commented 8 years ago

I'm trying to use @act/main, version 0.0.4, and I get:

ERROR: ModuleNotFoundError
Module not found: Error: Cannot resolve module '@act/main' in /api/sandbox/14647022005299643
christianalfoni commented 8 years ago

Hi @joaomilho!

There is one limitaiton in Webpackbin and that is directories not part of the "main" entry point. Webpackbin can not load in all files in a package and make them potential entry points as most packages would be huge. So packages that points to: lib/somepath must explicitly be known by Webpackbin at the moment.

I can add this on next release though :)

joaomilho commented 8 years ago

I'm not loading a file that is not the main, but a namespaced package. That's an npm feature where you can have a namespace, like in "@cycle/core".

christianalfoni commented 8 years ago

Hi, ah, sorry... I read the package name a bit too fast. Then there has to be something else in that package that does not conform to the logic webpackbin uses to extract packages.

I needs to be debugged. The problem occurs in this project: https://github.com/christianalfoni/npm-extractor, if you want to try to debug it.

Or I will look into it when I find some time :)

joaomilho commented 8 years ago

I could help, but npm-extractor seems to have no docs at all... Can you just add some pointers there so one can get started? Thanks in advance.

adrianmcli commented 7 years ago

It's been over half a year and I'm getting the exact same issue with @cycle/dom. Are there any updates on this? @christianalfoni @joaomilho

christianalfoni commented 7 years ago

Check README of this repo :)