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

@nestjs/swagger throwing error for @nestjs/core on npm install for sh -c opencollective || exit 0 #12655

Closed
4 of 15 tasks
frankpengau opened this issue Oct 25, 2023 · 2 comments
Closed
4 of 15 tasks
Labels
needs triage This issue has not been looked into

Comments

@frankpengau
Copy link

frankpengau commented Oct 25, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When using @nestjs/swagger for our base library in typescript, all of our CI/CD builds are throwing errors for npm install due to @nestjs/core for the command: opencollective || exit 0.

Upon investigating it seems the core package's package.json postinstall script uses it, located here:

"postinstall": "opencollective || exit 0"

However, the root package.json uses opencollective?

"postinstall": "opencollective",

Honestly, I'm not quite sure what the issue is, but our CI/CD builds keep failing, so seeking any and all help that I can get, to resolve this issue of mine.

Our CI/CD builds are running on Amazon Linux 2 EC2 Instances.

Minimum reproduction code

https://stackblitz.com/edit/nestjs-typescript-starter-3xhh9q?file=package.json

Steps to reproduce

  1. npm install

Expected behavior

Not throw an error

Package

  • I don't know. Or some 3rd-party package
  • @nestjs/common
  • @nestjs/core
  • @nestjs/microservices
  • @nestjs/platform-express
  • @nestjs/platform-fastify
  • @nestjs/platform-socket.io
  • @nestjs/platform-ws
  • @nestjs/testing
  • @nestjs/websockets
  • Other (see below)

Other package

@nuxtjs/opencollective

NestJS version

^9.0.0 || ^10.0.0

Packages versions

package.json

"@nestjs/swagger": "^7.1.13"

package-lock.json

"node_modules/@nestjs/swagger": {
      "version": "7.1.13",
      "resolved": "https://registry.npmjs.org/@nestjs/swagger/-/swagger-7.1.13.tgz",
      "integrity": "sha512-aHfW0rDZZKTuPVSkxutBCB16lBy5vrsHVoRF5RvPtH7U2cm4Vf+OnfhxKKuG2g2Xocn9sDL+JAyVlY2VN3ytTw==",
      "dependencies": {
        "@nestjs/mapped-types": "2.0.2",
        "js-yaml": "4.1.0",
        "lodash": "4.17.21",
        "path-to-regexp": "3.2.0",
        "swagger-ui-dist": "5.9.0"
      },
      "peerDependencies": {
        "@fastify/static": "^6.0.0",
        "@nestjs/common": "^9.0.0 || ^10.0.0",
        "@nestjs/core": "^9.0.0 || ^10.0.0",
        "class-transformer": "*",
        "class-validator": "*",
        "reflect-metadata": "^0.1.12"
      },
      "peerDependenciesMeta": {
        "@fastify/static": {
          "optional": true
        },
        "class-transformer": {
          "optional": true
        },
        "class-validator": {
          "optional": true
        }
      }
    },

Node.js version

20.9.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

npm notice
npm notice New minor version of npm available! 10.1.0 -> 10.2.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.1
npm notice Run npm install -g [email protected] to update!
npm notice
npm ERR! path /app/node_modules/@nestjs/core
npm ERR! command failed
npm ERR! signal SIGKILL
npm ERR! command sh -c opencollective || exit 0
npm ERR! Thanks for installing nest
npm ERR!                  Please consider donating to our open collective
npm ERR!                         to help us maintain this package.
npm ERR!
npm ERR!                             Number of contributors: 0
npm ERR!                               Number of backers: 979
npm ERR!                              Annual budget: $135,907
npm ERR!                              Current balance: $16,996
npm ERR!
npm ERR!              Become a partner: https://opencollective.com/nest/donate
@frankpengau frankpengau added the needs triage This issue has not been looked into label Oct 25, 2023
@micalevisk
Copy link
Member

micalevisk commented Oct 25, 2023

try it out with --ignore-scripts flag on npm install


this might be related with #12383

@kamilmysliwiec
Copy link
Member

Let's track this here #12383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue has not been looked into
Projects
None yet
Development

No branches or pull requests

3 participants