Skip to content

Global Install fails in node:lts container #26

@cdhunt

Description

@cdhunt

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

> [email protected] 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions