Skip to content

Fail to use gulp-install with yarn in private package manager #60

Description

@lamaldonado

I'm getting problems using yarn with private package manager

My code:

install() {
    let gulp = this.gulp;
    gulp.task('install', function () {
        return gulp
            .src(['./package.json', './yarn.lock', './.npmrc'])
            .pipe(gulp.dest('./build/'))
            .pipe(install({
              commands: {
                'package.json': 'yarn'
              },
              yarn: ['--verbose', '--production']
            }));
    });
    return this;
}

.npmrc file:

registry=http://{internalServer}
//{internalServer}/:_authToken={Token}
//{internalServer}/:always-auth=true

When the pipeline in GitlabCI runs, I got this error:

error An unexpected error occurred: "http://{internalServer}/buffer/-/buffer-4.9.1.tgz: Request failed \"403 Forbidden\"".

Then running yarn with verbose mode, I can see that it recognize the .npm file

verbose 0.577 Found configuration file "/{path-to-my-module}/build/.npmrc"
verbose 0.578 Found configuration file "/{path-to-my-module}/.npmrc".

Any help is appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions