Error: Cannot find module 'recast'
See original GitHub issuenpm -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:
- Created 5 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top 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 >
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 Free
Top 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
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 tonode_modules/recast
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…