ramda-extension icon indicating copy to clipboard operation
ramda-extension copied to clipboard

@babel/runtime not listed as project dependency.

Open cianx opened this issue 3 years ago • 1 comments

Describe the bug When running in a clean environment (such as a docker container such as a node docker container https://hub.docker.com/_/node).

internal/modules/cjs/loader.js:883 throw err; ^

Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault' Require stack:

  • /home/cian/Workspaces/concord/tmp/ramda-extension-bug/node_modules/ramda-extension/lib/index.js
  • /home/cian/Workspaces/concord/tmp/ramda-extension-bug/index.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) at Function.Module._load (internal/modules/cjs/loader.js:725:27) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (/home/cian/Workspaces/concord/tmp/ramda-extension-bug/node_modules/ramda-extension/lib/index.js:3:30) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/cian/Workspaces/concord/tmp/ramda-extension-bug/node_modules/ramda-extension/lib/index.js', '/home/cian/Workspaces/concord/tmp/ramda-extension-bug/index.js' ] }

To Reproduce Using the attached project, copy the package.json and index.js to a directory

execute the command docker run -it -v pwd:/project -w /project node:14-alpine "/bin/sh" from that directory From the docker prompt run: npm install && node index.js This will produce

npm WARN [email protected] No description
npm WARN [email protected] No repository field.

audited 2 packages in 0.348s
[ramda-extension-bug.zip](https://github.com/tommmyy/ramda-extension/files/6395788/ramda-extension-bug.zip)

found 0 vulnerabilities

internal/modules/cjs/loader.js:883
  throw err;
  ^

Error: Cannot find module '@babel/runtime/helpers/interopRequireDefault'
Require stack:
- /project/node_modules/ramda-extension/lib/index.js
- /project/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/project/node_modules/ramda-extension/lib/index.js:3:30)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/project/node_modules/ramda-extension/lib/index.js',
    '/project/index.js'
  ]
}

This issue does not require docker, only an envirnment that does not already have @babel/runtime installed by another package, globally, or is not process by babel.

Expected behavior Package to load with out error.

Additional context

Add any other context about the problem here. If the zip file does not come thru, the contents are: package.json

{
  "name": "ramda-extension-bug",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "ramda": "^0.27.1",
    "ramda-extension": "^0.11.0"
  }
}

index.js

const { capitalizeAll } = require('ramda-extension');

function main() {
  console.log(capitalizeAll('test'));
}
main();

cianx avatar Apr 29 '21 01:04 cianx

Thank you, I look at that

tommmyy avatar Apr 29 '21 07:04 tommmyy