tldrlegal: Error: Cannot find module @babel
Got this error when running against my create-react-app based project, any idea why it crashes?
C:\Projekte\mine>tldrlegal
module.js:550
throw err;
^
Error: Cannot find module 'C:\Projekte\mine/node_modules/@babel/plugin-proposal-class-properties/node_modules/@babel/package.json'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at getPackage (C:\Users\rejas\AppData\Roaming\npm\node_modules\tldrlegal\node_modules\legally\lib\legally.js:17:13)
at packages.reduce (C:\Users\rejas\AppData\Roaming\npm\node_modules\tldrlegal\node_modules\legally\lib\legally.js:36:8)
at Array.reduce (<anonymous>)
at module.exports.root (C:\Users\rejas\AppData\Roaming\npm\node_modules\tldrlegal\node_modules\legally\lib\legally.js:34:19)
at Object.<anonymous> (C:\Users\rejas\AppData\Roaming\npm\node_modules\tldrlegal\index.js:28:16)
at Module._compile (module.js:653:30)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (9 by maintainers)
@rejas Yes you got it!
I didn’t have
yarninstalled so that explains why mycreate-react-appinvocation wasn’t creating a brokennode_modules/directory structure thattldrlegalwasn’t liking!All along that was the difference causing this strange behavior.
Updating
tldrlegalto use the latest version oflegallyin https://github.com/eladnava/tldrlegal/commit/1d3ebed55725b0b6e87de3fd0a3f3b16c6248999 has added support for Yarn’s specialnode_modules/format.Published
tldrlegalversion1.0.8which resolves this.Thanks all for your help! 🎉