browserify-shim: Unable to find a browserify-shim config section in the package.json
I’m getting this when trying to require a file outside my app’s directory. So just the presence of require('../hmm') will spit out
Error: Unable to find a browserify-shim config section in the package.json for /Users/bclinkinbeard/Code/scratch/bug-reports/b-shim/hmm.js
at /Users/bclinkinbeard/Code/scratch/bug-reports/b-shim/app/node_modules/browserify-shim/lib/resolve-shims.js:163:38
at /Users/bclinkinbeard/Code/scratch/bug-reports/b-shim/app/node_modules/browserify-shim/node_modules/mothership/index.js:27:31
at testDir (/Users/bclinkinbeard/Code/scratch/bug-reports/b-shim/app/node_modules/browserify-shim/node_modules/mothership/node_modules/find-parent-dir/index.js:20:36)
at /Users/bclinkinbeard/Code/scratch/bug-reports/b-shim/app/node_modules/browserify-shim/node_modules/mothership/node_modules/find-parent-dir/index.js:26:7
at Object.cb [as oncomplete] (fs.js:168:19)
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 23 (3 by maintainers)
Commits related to this issue
- chore(META): fix browserify-shim issues See https://github.com/thlorenz/browserify-shim/issues/61 — committed to cyclejs/cyclejs by staltz 7 years ago
I’m also having this issue with the case that @Fauntleroy describes — where I’m
npm linking in modules that I’m working on.Workaround (mostly for my own reference) I have a directory structure like this:
The common_components directory is symlinked from within the app directories.
I also got this error on code within the common_components directory, none of which have a
package.json. I addedpackage.jsonto the root directory like this:This
package.jsonjust containsNot an elegant solution, but this kills the error.