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.

Module not found: Error: Can't resolve 'v8'

See original GitHub issue

Bug Report

  • I would like to work on a fix!
* v8 in ./node_modules/@babel/core/lib/transformation/util/clone-deep.js

To install it, you can run: npm install --save v8
Child
    
    ERROR in ./node_modules/@babel/core/lib/transformation/util/clone-deep.js
    Module not found: Error: Can't resolve 'v8' in '/Users/qifutao/Documents/workspace/dxp-flow/frontend/node_modules/@babel/core/lib/transformation/util'
     @ ./node_modules/@babel/core/lib/transformation/util/clone-deep.js 16:9-22
     @ ./node_modules/@babel/core/lib/transformation/normalize-file.js
     @ ./node_modules/@babel/core/lib/transformation/index.js
     @ ./node_modules/@babel/core/lib/transform-ast.js
     @ ./node_modules/@babel/core/lib/index.js
     @ ./node_modules/@whalecloud/page-builder/utils/transformJS.js
     @ ./node_modules/@whalecloud/page-builder/render/components/RenderForm.js
     @ ./node_modules/@whalecloud/page-builder/render/components/FormRender.js
     @ ./src/pages/approveList/index.tsx
     @ ./src/.fishx/config/routes.js
     @ ./src/.fishx/router.tsx
     @ ./src/.fishx/index.tsx
     @ multi ./src/.fishx/index.tsx

Environment


  • Babel version(s): v7.13.13
  • Node/npm version: Node 12
  • OS: [e.g. macOS 10.15.4]
  • Monorepo: yes
  • How you are using Babel: webpack

Possible Solution

Additional context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JLHwungcommented, Mar 29, 2021

Fixed in @babel/core 7.13.14. Thanks for everyone who reported this issue, created a reproduction repo and came up with a fix!

1reaction
davedxcommented, Mar 29, 2021

Can confirm this breaks our build too, we’re using react-scripts so I don’t think it’s a webpack misconfiguration on our side.

Error looks like this:

react-scripts build

Creating an optimized production build… Failed to compile.

…/node_modules/react-view/node_modules/@babel/core/lib/transformation/util/clone-deep.js

Cannot find module: ‘v8’. Make sure this package is installed.

You can install this package by running: npm install v8.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to resolve path to module 'v8' · Issue #676 - GitHub
This seems to be a bug in the resolve package - specifically that https://npmcdn.com/resolve@1.1.7/lib/core.json does not contain the string ...
Read more >
NextJs 13 & Framer Motion: Module not found: Can't resolve 'v8'
I think that your problem has something to do with calling framerMotion on server side, because v8 is engine of browser... but unfortunately...
Read more >
module-not-found - Next.js
A module not found error can occur for many different reasons: The module you're trying to import is not installed in your dependencies;...
Read more >
Have a JavaScript Module Not Found Error ... - Airbrake Blog
If you're seeing a "module not found: error: can't resolve," in your Javascript code, here's an explanation as to why and how to...
Read more >
How to fix the `can't resolve module` error in Next.js
I ran into this issue with Next.js: Module not found: Can't resolve 'fs'. In a Next.js page your can import methods from a...
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