cspotcode / cspotcode/npm-pwsh

Global Install fails in node:lts container

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I'm trying to install in a `node:lts` docker image and get the following error.

```
# npm install -g pwsh
/home/node/.npm-global/bin/pwsh -> /home/node/.npm-global/lib/node_modules/pwsh/bin/pwsh

> pwsh@0.3.0 postinstall /home/node/.npm-global/lib/node_modules/pwsh
> node ./npm_lifecycle_postinstall.js

Error: EACCES: permission denied, mkdir '/home/node/.npm-global/lib/node_modules/@cspotcode'
```

Dockefile looks like this following [these](https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#global-npm-dependencies) instructions for global installs.

```dockerfile
FROM node:lts

ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=$PATH:/home/node/.npm-global/bin

RUN npm install -g pwsh
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.