Skip to content

“npm ERR!” during code-server npm install #1906

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

Closed
marfier opened this issue Jul 23, 2020 · 17 comments
Closed

“npm ERR!” during code-server npm install #1906

marfier opened this issue Jul 23, 2020 · 17 comments
Labels
waiting-for-info Waiting for more information from submitter

Comments

@marfier
Copy link

marfier commented Jul 23, 2020

~# npm install -g code-server
npm WARN @coder/[email protected] requires a peer of @google-cloud/logging@^4.5.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /usr/lib/node_modules/code-server/node_modules/tar-fs/node_modules/chownr
npm ERR! dest /usr/lib/node_modules/code-server/node_modules/tar-fs/node_modules/.chownr.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/lib/node_modules/code-server/node_modules/tar-fs/node_modules/chownr' -> '/usr/lib/node_modules/code-server/node_modules/tar-fs/node_modules/.chownr.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-23T02_52_12_426Z-debug.log
~#

/root/.npm/_logs/2020-07-23T02_52_12_426Z-debug.log

@marfier marfier changed the title “npm ERR!” during code-serger npm install “npm ERR!” during code-server npm install Jul 23, 2020
@Adebesin-Cell
Copy link

npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see palantir/tslint#4534 for more information.
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142

@Adebesin-Cell
Copy link

How do I solve the error?

@marfier
Copy link
Author

marfier commented Jul 23, 2020

@Adebesin-Cell please open a separate issue for that.

@nhooyr
Copy link
Contributor

nhooyr commented Aug 4, 2020

@GalacticLion7 Please try latest master again.

Also, your link doesn't show the logs for me unfortunately.

Screen Shot 2020-08-04 at 7 22 04 AM

@nhooyr
Copy link
Contributor

nhooyr commented Aug 31, 2020

Any updates @GalacticLion7

@code-asher code-asher added the waiting-for-info Waiting for more information from submitter label Sep 8, 2020
@markpanado
Copy link

Having the same issue on Alpine Linux

@marfier
Copy link
Author

marfier commented Oct 9, 2020

@nhooyr here's a new link: https://transfer.sh/U1MPP/2020-10-09T12_38_39_831Z-debug.log

Sorry for the late response.

@code-asher
Copy link
Member

code-asher commented Oct 9, 2020 via email

@stefanhenseler
Copy link

stefanhenseler commented Dec 13, 2020

@code-asher having the same issue, using yarn v1.22.5. I'm using the following command yarn global add [email protected]. I've tried it using root and coder user, no difference. I always get the same error:

yarn global v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "code-server > @coder/[email protected]" has unmet peer dependency "@google-cloud/logging@^4.5.2".
[4/4] Building fresh packages...

My alpine container finishes building, but when I start the application, obviously it crashes due to the missing dependency. I tried installing the peer dependency manually, but the current version is 9.0.0 and yarn crashes when I try to install 4.5.2.

@code-asher
Copy link
Member

code-asher commented Dec 14, 2020 via email

@stefanhenseler
Copy link

stefanhenseler commented Dec 14, 2020

@code-asher I think I didn't read properly. In my case it was just missing some libraries I guess, as explained in the npm install docs. Here what worked for me on Alpine 3.12:

RUN apk upgrade -U -a && \
    apk add libxkbfile-dev libsecret-dev libx11-dev \
    && rm -rf /var/cache/* \
    && mkdir /var/cache/apk
RUN yarn global add typescript
RUN yarn global add code-server

@code-asher
Copy link
Member

code-asher commented Dec 15, 2020 via email

@nhooyr
Copy link
Contributor

nhooyr commented Dec 15, 2020

Opened #2474!

@nhooyr nhooyr closed this as completed Dec 15, 2020
@stefanhenseler
Copy link

I actually switched back to centos... since alpine doesn't seem to be the best choice when it comes to using it as a code-server base image. Just so many things that are just a bit more work compared to other distros, mainly due to musl vs. glibc. For example, getting Tensorflow to work is just not as easy.

@mrfoxie
Copy link
Contributor

mrfoxie commented Feb 16, 2021

@code-asher I think I didn't read properly. In my case it was just missing some libraries I guess, as explained in the npm install docs. Here what worked for me on Alpine 3.12:

RUN apk upgrade -U -a && \
    apk add libxkbfile-dev libsecret-dev libx11-dev \
    && rm -rf /var/cache/* \
    && mkdir /var/cache/apk
RUN yarn global add typescript
RUN yarn global add code-server

I tried this process but it got stuck on yarn global add code-server

Screenshot_2021_0216_230540

@mudrii
Copy link

mudrii commented Jun 27, 2021

I have same problem building code-server 3.10.2

I try to update nixpks and getting same error related to @google-cloud/logging@^4.5.2

yarn install v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @coder/[email protected]" has unmet peer dependency "@google-cloud/logging@^4.5.2".
warning " > [email protected]" has incorrect peer dependency "typescript@^3.0.0".
[4/4] Building fresh packages...
warning Ignored scripts due to flag.
Done in 13.68s.
error: builder for '/nix/store/2ppw5w73f1f3rmfdd3my4nx89qp8c985-code-server-3.10.2-x86_64-linux-yarn-cache.drv' failed with exit code 123;
       last 10 log lines:
       > Done in 1.21s.
       > yarn install v1.22.10
       > [1/4] Resolving packages...
       > [2/4] Fetching packages...
       > [3/4] Linking dependencies...
       > warning " > @coder/[email protected]" has unmet peer dependency "@google-cloud/logging@^4.5.2".
       > warning " > [email protected]" has incorrect peer dependency "typescript@^3.0.0".
       > [4/4] Building fresh packages...
       > warning Ignored scripts due to flag.
       > Done in 13.68s.
       For full logs, run 'nix log /nix/store/2ppw5w73f1f3rmfdd3my4nx89qp8c985-code-server-3.10.2-x86_64-linux-yarn-cache.drv'.

@code-asher
Copy link
Member

code-asher commented Jun 28, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-info Waiting for more information from submitter
Projects
None yet
Development

No branches or pull requests

8 participants