Tuesday, 10 July 2018

Browserify is unable to find a module, despite searching the correct path.

There isn't a browserify subreddit, unfortunately, and so this is probably the most relevant subreddit next to webdev and javascript.I'm trying to bundle using browserify, and I keep getting this error message on the terminal:Error: Cannot find module 'DocRef.json' from 'C:\Users\Admin\Desktop\Code\JSLookUp\lib\background'at ...A list of directories.Now, the only problem is that the path it gives me - in which it claims to be unable to locate the file - is entirely correct.My require() uses express, because the file I'm importing is json:app.locals.data = require('./DocRef.json');It seems fine to me.I've tried exiting and rebooting the terminal, but I get the same incomprehensible message. If someone could clue me in as to why I'm getting this error message, I'd really appreciate it.

Submitted July 10, 2018 at 05:15PM by HUMBLEFART

No comments:

Post a Comment