[Pkg-javascript-devel] Bug#940704: new error: Cannot find module 'babel-preset-env'

Paolo Greppi paolo.greppi at libpf.com
Sat Jan 23 17:04:05 GMT 2021


Hi, I think I fixed the error:

   Cannot find module 'babel-plugin-transform-inline-imports-commonjs'

with this commit: https://salsa.debian.org/js-team/node-yarnpkg/-/commit/d055e01b6d1a7f6fad6df2ccdf6d0f7d01ddcbc2
but the tests still fail, all with this new error:

   FAIL __tests__/commands/licenses.js
     ● Test suite failed to run
   
       Cannot find module 'babel-preset-env'
       Require stack:
       - /usr/share/nodejs/@babel/core/lib/config/files/plugins.js
       - /usr/share/nodejs/@babel/core/lib/config/files/index.js
       - /usr/share/nodejs/@babel/core/lib/index.js
       - /usr/share/nodejs/babel-jest/build/loadBabelConfig.js
       - /usr/share/nodejs/babel-jest/build/index.js
       - /usr/share/nodejs/@jest/transform/build/ScriptTransformer.js
       - /usr/share/nodejs/@jest/transform/build/index.js
       - /usr/share/nodejs/jest-runtime/build/index.js
       - /usr/share/nodejs/jest-runner/build/testWorker.js
       - /usr/share/nodejs/jest-worker/build/workers/processChild.js
       - Did you mean "@babel/env"?
   
         89 |
         90 |   try {
       > 91 |     return require.resolve(standardizedName, {
            |                    ^
         92 |       paths: [dirname]
         93 |     });
         94 |   } catch (e) {
   
         at resolveStandardizedName (../../../../../usr/share/nodejs/@babel/core/lib/config/files/plugins.js:91:20)
         at resolvePreset (../../../../../usr/share/nodejs/@babel/core/lib/config/files/plugins.js:48:10)
         at loadPreset (../../../../../usr/share/nodejs/@babel/core/lib/config/files/plugins.js:67:20)
         at createDescriptor (../../../../../usr/share/nodejs/@babel/core/lib/config/config-descriptors.js:154:9)
         at ../../../../../usr/share/nodejs/@babel/core/lib/config/config-descriptors.js:109:50
             at Array.map (<anonymous>)
         at createDescriptors (../../../../../usr/share/nodejs/@babel/core/lib/config/config-descriptors.js:109:29)
         at createPresetDescriptors (../../../../../usr/share/nodejs/@babel/core/lib/config/config-descriptors.js:101:10)

see: https://salsa.debian.org/js-team/node-yarnpkg/-/jobs/1373973

I tried the obvious fix in debian/tests/control:

   -Depends: @, jest
   +Depends: @, jest, node-babel-preset-env

but no change.

Paolo



More information about the Pkg-javascript-devel mailing list