Error: Cannot find module 'node_modules/is-buffer/index.js' from ...
See original GitHub issue$ cat buf.js
module.exports = function (b) { return Buffer.isBuffer(b) }
$ npm i browserify
...
$ ./node_modules/.bin/browserify buf.js
Error: Cannot find module 'node_modules/is-buffer/index.js' from '/home/kirill/tmp'
at /home/kirill/tmp/node_modules/resolve/lib/async.js:46:17
at process (/home/kirill/tmp/node_modules/resolve/lib/async.js:173:43)
at ondir (/home/kirill/tmp/node_modules/resolve/lib/async.js:188:17)
at load (/home/kirill/tmp/node_modules/resolve/lib/async.js:69:43)
at onex (/home/kirill/tmp/node_modules/resolve/lib/async.js:92:31)
at /home/kirill/tmp/node_modules/resolve/lib/async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)
$ vim buf.js
$ cat buf.js
;(function () { new Buffer(0) })()
module.exports = function (b) { return Buffer.isBuffer(b) }
$ ./node_modules/.bin/browserify buf.js
(function e(t,n,r){function s(o, ... // ok
Related: https://github.com/substack/node-browserify/issues/1228
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:17 (2 by maintainers)
Top Results From Across the Web
Unexpected token ILLEGAL - Stack Overflow
I tried updating and reinstalling socket.io now I'm getting this error. C:\MY-APP\dataService>node dataAPI.js { [Error: Cannot find module '../ ...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
you're trying to import an item from a module you don't have installed in your project directory; you're importing some things from an...
Read more >require.resolve "Error: Cannot find module" but ... - Reddit
resolve "Error: Cannot find module" but module exists in node_modules folder. this is all I'm trying to do require.resolve("stream ...
Read more >Using node modules with njs - Nginx.org
This article describes ways to reuse Node.js code in njs. ... code.js Thrown: Error: Cannot find module "./static.js" at require (native) at main...
Read more >node.js - module - iTecNote
Node.js – Error: Cannot find module './is-buffer' ... is-buffer is installed. ... ket.io-adapter\node_modules\socket.io-parser\index.js:11:13) at Module.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be fixed in insert-module-globals@7.0.2; do
npm update
to get it!Just do this =>
npm install is-buffer --save