Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cianx opened this issue Apr 29, 2021 · 1 comment
Open

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

cianx opened this issue Apr 29, 2021 · 1 comment

Comments

@cianx
Copy link

cianx commented Apr 29, 2021

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 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
Copy link
Owner

tommmyy commented Apr 29, 2021

Thank you, I look at that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants