cspotcode / npm-pwsh

Install PowerShell via npm for use in npm scripts or elsewhere.
12 stars 5 forks source link

Global Install fails in node:lts container #26

Open cdhunt opened 3 years ago

cdhunt commented 3 years ago

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 instructions for global installs.

FROM node:lts

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

RUN npm install -g pwsh