Sunday, March 11, 2018

Browserify tries to find module on a bad path

Leave a Comment

I'm trying to make a browser-side Imgur module, but the imgur module on NPM has some problems with requiring another module.

Error: Cannot find module './C:/Users/*******/AppData/Local/Yarn/config/global/node_modules/is-buffer/index.js' from 'D:\Projects\********\node_modules\http-signature\lib'

As you can see, it's trying to get a module from ./C:/..., but since there's no C: directory in the CWD, it can't find anything.

Is it possible to fix this?

1 Answers

Answers 1

People have reported a similar problem in this bug, which you may be caught in.

Fortunately it was fixed very recently. Run npm update to grab the Browserify dependency insert-module-globals@7.0.2 or later, which should contain the fix.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment