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

[BUG] dependency of a dependency isn't installed when using npm ci --only=production #979

Closed
dlcoffee opened this issue Mar 4, 2020 · 1 comment
Labels
Bug thing that needs fixing

Comments

@dlcoffee
Copy link

dlcoffee commented Mar 4, 2020

What / Why

hi! i have a nextjs project that is dependent on @babel/core. in my ci build (npm ci --only=production), @babel/core isn't included, and is failing my build.

when i load up my node console, i also am not seeing @babel/core.

my current workaround is to recreate my entire package-lock, but i'd rather not do that, as i'd be updating more dependencies than i'd want to at the moment.

Welcome to Node.js v12.6.0.
Type ".help" for more information.
> require('@babel/core')
Thrown:
Error: Cannot find module '@babel/core'
Require stack:
- <repl>
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '<repl>' ]
}

When

  • n/a

Where

i uploaded my project's package.json/package-lock.json to this repo without any source code

this line should be telling npm to install @babel/core, right? https://github.com/dlcoffee/npm-problem/blob/master/package-lock.json#L14356

How

Current Behavior

@babel/core not installed when it is a dependency of next

Steps to Reproduce

  1. run npm ci --only=production
  2. load up node
  3. require('@babel/core')
  4. see error

Expected Behavior

  1. run npm ci --only=production
  2. load up node
  3. require('@babel/core')
  4. see no errors

Who

  • n/a

References

  • n/a
@dlcoffee dlcoffee changed the title [BUG] dependency of a dependency isn't installed [BUG] dependency of a dependency isn't installed when using npm ci --only=production Mar 4, 2020
@darcyclarke darcyclarke added the Bug thing that needs fixing label Oct 30, 2020
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants