Comments (7)
Node.js has introduced support for ESM in the VM API in v12.16 (https://nodejs.org/api/vm.html#class-vmmodule), and this package only supports Node.js 14.15+ (
Line 10 in a186b8b
from babel-loader.
I'm having this error when upgrading to 9.1.3
, which doesn't happen in 9.1.2
. Could it be related? I'm using Node.js v20.5.0. Might be good to mention that I'm also using Yarn PnP.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'find-cache-dir' imported from /Users/llins/next-wave/.yarn/__virtual__/babel-loader-virtual-734c38bb6e/0/cache/babel-loader-npm-9.1.3-1856fdd4ac-b168dde5b8.zip/node_modules/babel-loader/lib/cache.js
Did you mean to import find-cache-dir-npm-4.0.0-cc082212a1-52a456a80d.zip/node_modules/find-cache-dir/index.js?
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:782:9)
at moduleResolve (node:internal/modules/esm/resolve:831:20)
at defaultResolve (node:internal/modules/esm/resolve:1036:11)
at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:251:12)
at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:140:32)
at DefaultModuleLoader.import (node:internal/modules/esm/loader:227:28)
at importModuleDynamically (node:internal/modules/cjs/loader:1163:37)
at importModuleDynamicallyWrapper (node:internal/vm/module:428:21)
at importModuleDynamically (node:internal/vm:105:46) {
code: 'ERR_MODULE_NOT_FOUND'
}
from babel-loader.
I'm having this error when upgrading to
9.1.3
, which doesn't happen in9.1.2
. Could it be related? I'm using Node.js v20.5.0. Might be good to mention that I'm also using Yarn PnP.Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'find-cache-dir' imported from /Users/llins/next-wave/.yarn/__virtual__/babel-loader-virtual-734c38bb6e/0/cache/babel-loader-npm-9.1.3-1856fdd4ac-b168dde5b8.zip/node_modules/babel-loader/lib/cache.js Did you mean to import find-cache-dir-npm-4.0.0-cc082212a1-52a456a80d.zip/node_modules/find-cache-dir/index.js? at new NodeError (node:internal/errors:405:5) at packageResolve (node:internal/modules/esm/resolve:782:9) at moduleResolve (node:internal/modules/esm/resolve:831:20) at defaultResolve (node:internal/modules/esm/resolve:1036:11) at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:251:12) at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:140:32) at DefaultModuleLoader.import (node:internal/modules/esm/loader:227:28) at importModuleDynamically (node:internal/modules/cjs/loader:1163:37) at importModuleDynamicallyWrapper (node:internal/vm/module:428:21) at importModuleDynamically (node:internal/vm:105:46) { code: 'ERR_MODULE_NOT_FOUND' }
Please upgrade Yarn to 3.1 or above, see https://yarnpkg.com/getting-started/qa#does-yarn-support-esm
from babel-loader.
I'm having this error when upgrading to
9.1.3
, which doesn't happen in9.1.2
. Could it be related? I'm using Node.js v20.5.0. Might be good to mention that I'm also using Yarn PnP.Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'find-cache-dir' imported from /Users/llins/next-wave/.yarn/__virtual__/babel-loader-virtual-734c38bb6e/0/cache/babel-loader-npm-9.1.3-1856fdd4ac-b168dde5b8.zip/node_modules/babel-loader/lib/cache.js Did you mean to import find-cache-dir-npm-4.0.0-cc082212a1-52a456a80d.zip/node_modules/find-cache-dir/index.js? at new NodeError (node:internal/errors:405:5) at packageResolve (node:internal/modules/esm/resolve:782:9) at moduleResolve (node:internal/modules/esm/resolve:831:20) at defaultResolve (node:internal/modules/esm/resolve:1036:11) at DefaultModuleLoader.resolve (node:internal/modules/esm/loader:251:12) at DefaultModuleLoader.getModuleJob (node:internal/modules/esm/loader:140:32) at DefaultModuleLoader.import (node:internal/modules/esm/loader:227:28) at importModuleDynamically (node:internal/modules/cjs/loader:1163:37) at importModuleDynamicallyWrapper (node:internal/vm/module:428:21) at importModuleDynamically (node:internal/vm:105:46) { code: 'ERR_MODULE_NOT_FOUND' }
Please upgrade Yarn to 3.1 or above, see https://yarnpkg.com/getting-started/qa#does-yarn-support-esm
We're using Yarn 3.6.1
from babel-loader.
Can you share a reproduction repo? Babel-loader itself is using yarn pnp as well. And our CI looks good.
from babel-loader.
I believe - not fully confident - that #1005 by @ahce attempts to fix the very same issue, presenting a minimal repro in the process.
If the change leading to those errors is intended as is, I concur that it should be a breaking change.
from babel-loader.
Related Issues (20)
- [Bug]: TypeError: this.getOptions is not a function + SPFx HOT 8
- @babel/plugin-transform-optional-chaining, configuration does not take effect HOT 1
- BunnyJs
- `module.exports` is returned instead of `module.exports.default` when importing from node_modules HOT 1
- Plugin transform-runtime generates incorrect commonjs wrapper HOT 2
- Issue while creating build for React JS Application HOT 6
- unknow option .default HOT 5
- You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | HOT 1
- [Bug]: HOT 2
- Cache files take up too much disk space
- Refresh time is too slow in expo react-native project after upgrade HOT 14
- Babel-loader Cache - unable to cache in changing directory environment HOT 2
- After upgrade my nodejs version 16.8.0 to 16.9.0, I am getting this error "You may need an additional loader to handle the result of these loaders" HOT 1
- Bug Error Run npm ci npm ERR! Cannot read property '@babel/cli' of undefined npm ERR! HOT 1
- Feature request: Different browserslistEnv based on webpack target. HOT 1
- You may need additional loaders
- semver vulnerable to Regular Expression Denial of Service HOT 3
- Bump semver dependency to >= 7.5.2 HOT 1
- Vulnerable dependencies (indirect security issues) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-loader.