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 'recast'

See original GitHub issue

npm -v 5.6-5.8 node -v 8.9.4

you have recast in devDependencies, but you are using this module in general file. In some case I don’t get module on top of node_modules tree. and it doesn’t exist in node_modules of babel-plugin-react-docgen. it only exist in react-docgen node_modules. Please, add recast in dependencies.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rally25rscommented, Jan 21, 2019

It sometimes works depending on the hoisting of the package manager and what other packages are installed, but relying on this hoisting is a bad practice and can lead to unexpected results.

This also breaks use of yarn Plug’n’Play, or if you use yarn’s nohoist feature to prevent recast from a different transitive dependency from being moved to node_modules/recast

1reaction
togakangaroocommented, Jan 8, 2019

deleting all node_modules and storybook and reinstalling them and npx init’ing storybook worked for me to fix it…so maybe it’s not on yall and just a result of the npm ecosystem getting absurdly complex lately?

I don’t know…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Cannot find module 'recast' · Issue #62 - GitHub
you have recast in devDependencies, but you are using this module in general file. In some case I don't get module on top...
Read more >
recast - npm
Start using recast in your project by running `npm i recast`. ... See ast-types (especially the def/core.ts) module for a thorough overview ...
Read more >
Error: Cannot find module react when trying to run npm start
After a week I have finally found a solution. First I tried reinstalling an older versions of node and npm, which did not...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
When you get the “cannot find module” error, or “module not found”, it means you've not installed the package you're trying to use....
Read more >
Using Recast.js via NPM package import - #21 by roland
Hi. I'm trying to reproduce this example Babylon.js Playground in my Nuxt (Vue) environment. It works correctly if I include Recast library ...
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