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

ni and nci fail with version 0.22.2 #224

Closed
5 of 7 tasks
gaetan-shopopop opened this issue Aug 14, 2024 · 3 comments
Closed
5 of 7 tasks

ni and nci fail with version 0.22.2 #224

gaetan-shopopop opened this issue Aug 14, 2024 · 3 comments

Comments

@gaetan-shopopop
Copy link

Describe the bug

When running nci or ni with version 0.22.2 installed globally on any project (yarn or npm based), the command does nothing and exit quickly without output.
This failed in our github actions with a message Process completed with exit code 1 but without more informations.

When reverting to 0.22.1 with npm install -g @antfu/ni@0.22.1, there is no issue.

Is there a verbose mode or something llike that to get more informations from these commands ?

Reproduction

Any project with a valid package.json seems enough to reproduce

System Info

System:
    OS: Linux 6.5 Linux Mint 21.3 (Virginia)
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
    Memory: 5.41 GB / 15.35 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
@mancuoj
Copy link

mancuoj commented Aug 14, 2024

same here

@real34
Copy link

real34 commented Aug 14, 2024

I confirm the issue, and the workaround (pinning the version).

Reproduction

Here are a simple package.json + Dockerfile for reproduction if it can help:

{
  "name": "repro",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "echo \"Hello\""
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "axios": "^1.7.4"
  }
}
FROM node:20.16-alpine

WORKDIR /project

COPY . /project
RUN npm install -g @antfu/ni
# RUN npm install -g @antfu/ni@0.22.1

RUN nci --frozen

ENTRYPOINT ["nr"]
CMD [ "start" ]

Error output

✦ ❯ docker build .
[+] Building 3.0s (9/9) FINISHED                                                                                                                                                                                 docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                       0.0s
 => => transferring dockerfile: 217B                                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/node:20.16-alpine                                                                                                                                                       0.8s
 => [internal] load .dockerignore                                                                                                                                                                                          0.0s
 => => transferring context: 53B                                                                                                                                                                                           0.0s
 => [1/5] FROM docker.io/library/node:20.16-alpine@sha256:eb8101caae9ac02229bd64c024919fe3d4504ff7f329da79ca60a04db08cef52                                                                                                 0.0s
 => => resolve docker.io/library/node:20.16-alpine@sha256:eb8101caae9ac02229bd64c024919fe3d4504ff7f329da79ca60a04db08cef52                                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                                          0.0s
 => => transferring context: 322B                                                                                                                                                                                          0.0s
 => CACHED [2/5] WORKDIR /project                                                                                                                                                                                          0.0s
 => [3/5] COPY . /project                                                                                                                                                                                                  0.0s
 => [4/5] RUN npm install -g @antfu/ni                                                                                                                                                                                     1.9s
 => ERROR [5/5] RUN nci --frozen                                                                                                                                                                                           0.2s
------
 > [5/5] RUN nci --frozen:
------
Dockerfile:9
--------------------
   7 |     # RUN npm install -g @antfu/ni@0.22.1
   8 |     
   9 | >>> RUN nci --frozen
  10 |     
  11 |     ENTRYPOINT ["nr"]
--------------------
ERROR: failed to solve: process "/bin/sh -c nci --frozen" did not complete successfully: exit code: 1

@ziyue-pan
Copy link

same

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

No branches or pull requests

4 participants