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

Removed browser field dep breaks cached build #6

Open
calvinwiebe opened this issue Aug 19, 2015 · 0 comments
Open

Removed browser field dep breaks cached build #6

calvinwiebe opened this issue Aug 19, 2015 · 0 comments

Comments

@calvinwiebe
Copy link
Contributor

Observed in benbria/loop and in a verification test: If there is a module listed in the browser field of package.json, and the file that field points to changes, and the original file is removed, the build will break with something like:

Error: ENOENT, open '/Users/calvinwiebe/dev/uber-test/foo.js'

For instance:
package.json:

browser: {'foo': './foo.js'}

Build and save cache.
Remove ./foo.js and point browser field to a different file. Such as:

browser: {'foo': './inner/foo.js'}

There will be something in the cache like this:

"deps":{"foo":"/Users/calvinwiebe/dev/uber-test/foo.js"}

And everything will die.

Removing a normal require path and file will update the cache accordingly. The solution to this might be a bit involved, as we'd need to walk up the dependency tree.

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

No branches or pull requests

1 participant