tommmyy / ramda-extension

🤘Utility library for functional JavaScript. With ❤️ to Ramda.
https://ramda-extension.web.app/
Apache License 2.0
167 stars 24 forks source link

@babel/runtime not listed as project dependency. #194

Open cianx opened 3 years ago

cianx commented 3 years ago

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:

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

execute the command docker run -it -vpwd:/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 ramda-extension-bug@1.0.0 No description
npm WARN ramda-extension-bug@1.0.0 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();
tommmyy commented 3 years ago

Thank you, I look at that