Runtime dependency on `@babel/runtime`?
See original GitHub issueI’m looking into updating a couple packages’ dependencies from a custom fork of cannon.js
to cannon-es
. When installing and running my tests, however, I’m seeing the error about @babel/runtime
below. Looking at the generated output on unpkg, I see the dependency on @babel/runtime
as well. I’m not particularly familiar with using Babel directly, and it’s not part of my package. Is that supposed to be a runtime dependency? I’m assuming not, but if so shouldn’t it be declared in dependencies
or peerDependencies
?
The project I’m updating now is three-to-cannon, and the issue can be reproduced with npm install && npm run dist && npm test
after cloning the repo. Note that it’s a library, not an application: I declare cannon-es
as a peer dependency rather than bundling it with the package, and I cannot transpile cannon-es
on behalf of my users.
> three-to-cannon@2.0.0 test /Users/donmccurdy/Documents/Projects/three-to-cannon
> node test/index.js
internal/modules/cjs/loader.js:775
throw err;
^
Error: Cannot find module '@babel/runtime/helpers/possibleConstructorReturn'
Require stack:
- /Users/donmccurdy/Documents/Projects/three-to-cannon/node_modules/cannon-es/dist/index.cjs.js
- /Users/donmccurdy/Documents/Projects/three-to-cannon/dist/three-pathfinding.js
- /Users/donmccurdy/Documents/Projects/three-to-cannon/test/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
at Function.Module._load (internal/modules/cjs/loader.js:677:27)
at Module.require (internal/modules/cjs/loader.js:830:19)
at require (internal/modules/cjs/helpers.js:68:18)
at Object.<anonymous> (/Users/donmccurdy/Documents/Projects/three-to-cannon/node_modules/cannon-es/dist/index.cjs.js:7:1)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
at Module.require (internal/modules/cjs/loader.js:830:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/donmccurdy/Documents/Projects/three-to-cannon/node_modules/cannon-es/dist/index.cjs.js',
'/Users/donmccurdy/Documents/Projects/three-to-cannon/dist/three-pathfinding.js',
'/Users/donmccurdy/Documents/Projects/three-to-cannon/test/index.js'
]
}
npm ERR! Test failed. See above for more details.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top GitHub Comments
I believe that’s in the World class file, it’s an older attempt to polyfill. I will take a look soon if Marco doesn’t beat me to it.
Yes I’ve found a solution in #38.
It avoids us from using any polyfill.