Skip to content

Install Yarn as suggested in official documentation #351

Open
@AlicanC

Description

@AlicanC

I had an image which was built before Yarn was added to this project.

I installed Yarn like this:

FROM node:boron

# Update
RUN apt-get update -y

# Install apt-transport-https for Yarn repository
RUN apt-get install apt-transport-https -y

# Add Yarn repository
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

# Update
RUN apt-get update -y

# Install Yarn
RUN apt-get install yarn -y

It was working perfectly fine until I decided to update my image and use the provided Yarn instead of my own. Now my project's postinstall script is crashing with Error: Cannot find module '/bin/yarn.js'. If I try to install my own Yarn like above, yours just replace mine and it still doesn't work.

Could you just install Yarn as suggested in the official docs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions