Brunch 3.0.0 - Error: Cannot find module 'readable-stream/duplex'
See original GitHub issueDescription
A module seems to be missing
Expected behavior
Brunch should load and build
Actual behavior
Error happens when building
Environment
- Brunch: 3.0.0
- Node.js: 12.13.1 (LTS)
- NPM: 6.12.1
- Operating system: Linux Fedora 31
- Code editor: Atom
package.json
contents
{
"private": true,
"devDependencies": {
"brunch": "^3.0.0"
}
}
brunch config contents
module.exports = {
paths: {
public: 'public/assets/',
watched: ['resources/js', 'resources/sass']
},
files: {
javascripts: {
joinTo: {
'javascripts/app.js': /^app/,
'javascripts/vendor.js': /^(?!app)/
}
},
stylesheets: {joinTo: 'app.css'},
}
}
Other useful files, when present (log, bower.json
etc.)
Brunch: Local install exists, but failed to load it. Continuing with global install: Error: Cannot find module 'readable-stream/duplex'
Require stack:
- /path/to/project/node_modules/node-browser-modules/index.js
- /path/to/project/node_modules/deppack/lib/shims.js
- /path/to/project/node_modules/deppack/lib/modules.js
- /path/to/project/node_modules/deppack/lib/deppack.js
- /path/to/project/node_modules/deppack/index.js
- /path/to/project/node_modules/brunch/lib/fs_utils/write.js
- /path/to/project/node_modules/brunch/lib/watch.js
- /path/to/project/node_modules/brunch/lib/index.js
- /path/to/project/node_modules/brunch/lib/cli.js
- /path/to/project/node_modules/brunch/bin/brunch
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.resolve (internal/modules/cjs/helpers.js:80:19)
at Object.<anonymous> (/path/to/project/node_modules/node-browser-modules/index.js:27:33)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/path/to/project/node_modules/deppack/lib/shims.js:3:18) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/path/to/project/node_modules/node-browser-modules/index.js',
'/path/to/project/node_modules/deppack/lib/shims.js',
'/path/to/project/node_modules/deppack/lib/modules.js',
'/path/to/project/node_modules/deppack/lib/deppack.js',
'/path/to/project/node_modules/deppack/index.js',
'/path/to/project/node_modules/brunch/lib/fs_utils/write.js',
'/path/to/project/node_modules/brunch/lib/watch.js',
'/path/to/project/node_modules/brunch/lib/index.js',
'/path/to/project/node_modules/brunch/lib/cli.js',
'/path/to/project/node_modules/brunch/bin/brunch'
]
}
Cannot find module 'readable-stream/duplex'
Require stack:
- /path/to/project/node_modules/node-browser-modules/index.js
- /path/to/project/node_modules/deppack/lib/shims.js
- /path/to/project/node_modules/deppack/lib/modules.js
- /path/to/project/node_modules/deppack/lib/deppack.js
- /path/to/project/node_modules/deppack/index.js
- /path/to/project/node_modules/brunch/lib/fs_utils/write.js
- /path/to/project/node_modules/brunch/lib/watch.js
- /path/to/project/node_modules/brunch/lib/index.js
- /path/to/project/node_modules/brunch/lib/cli.js
- /path/to/project/node_modules/brunch/bin/brunch
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
brunch: Cannot find module "initialize" from "/" - Stack Overflow
Problem was: I configured brunch to look for the vendor js files in /^vendor/ , but they were in app/vendor. Copied the folder...
Read more >Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package/module ...
Read more >r/Tdarr - Reddit
Plugin error! Error: Cannot find module '../methods/lib'. Setting up Tdarr for the first time with Docker. I have followed a video and am ......
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
You’ll need to do
rm -rf node_modules package-lock.json && npm install
Oh ! I also currently have a browser-sync with brunch 2 running.
EDIT: And that was it 😉