question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot find module @babel

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:22 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
eladnavacommented, Jun 8, 2019

@rejas Yes you got it!

I didn’t have yarn installed so that explains why my create-react-app invocation wasn’t creating a broken node_modules/ directory structure that tldrlegal wasn’t liking!

All along that was the difference causing this strange behavior.

Updating tldrlegal to use the latest version of legally in https://github.com/eladnava/tldrlegal/commit/1d3ebed55725b0b6e87de3fd0a3f3b16c6248999 has added support for Yarn’s special node_modules/ format.

Published tldrlegal version 1.0.8 which resolves this.

Thanks all for your help! 🎉

0reactions
rejascommented, Jun 11, 2019

Nice. Works indeed! Thanks for your help too!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module '@babel/core' - node.js - Stack Overflow
Try running this. npm install @babel/core --save. babel changed their package so your babel-core will not be the same as @babel/core .
Read more >
Cannot find module 'babel-core' · Issue #124 - GitHub
After updating dependencies, I get this error: ``` ModuleBuildError: Module build failed (from ./node_modules/next/dist/build/webpack/loaders/ ...
Read more >
Babel Problem : Cannot find module - Big Nerd Ranch Forums
I've got this error: Failed at the chattrbox@1.0.0 build script 'browserify -d app/scripts/src/main.js -o app/scripts/dist/main.js'. npm ERR!
Read more >
I have an error it says Errpr:Cannot find module '@babel/register'
I have an error it says Errpr:Cannot find module '@babel/register' · MongoDB University M220JS: MongoDB for Javascript Developers.
Read more >
Cannot find module '@babel/helper-environment-visitor'
Hello People,. I am getting errors with @BABEL error. yarn workspace @hims/api build yarn workspace v1.22.4 yarn run v1.22.4
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found