1

I'm trying to install the npm package @stoplight/cli globally onto a docker image for use in a GitHub action. The docker image builds successfully, but when I call stoplight from /bin/bash with stoplight, I get the dreaded /usr/bin/env: 'node --no-deprecation': No such file or directory error.

I know there has been a lot of questions of this exact error, but so far none of the solutions have worked12.

I tried:

  • Creating symlink with ln -s /usr/bin/nodejs /usr/bin/node
  • Installing nodejs-legacy instead

My Dockerfile

FROM ubuntu:latest

RUN apt-get update
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get -y install git curl
RUN apt-get install -y nodejs
RUN npm install -g @stoplight/cli@3.0.1

ENTRYPOINT ["bash", "stoplight --version"]

EDIT: ** I also tried doing this with the official debian "node" image as base, and it was the same issue.

Any help appreciated

Tyler Nielsen
  • 605
  • 1
  • 7
  • 21

1 Answers1

0

we've released a new version of the CLI that should hopefully resolve the issue for you. The following dockerfile should work!

FROM ubuntu:latest

RUN apt-get update
RUN apt-get -y install curl
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g @stoplight/cli@3.0.4

ENTRYPOINT ["stoplight"]
Marc
  • 3,812
  • 8
  • 37
  • 61