.

npm disable ssl

npm config set registry http://registry.npmjs.org/

gulp parameters

function gulpConfig(environment) {
    return gulp.src('config/app.json')
        .pipe(gulpNgConfig('app.config', {
            environment: environment
        }))
        .pipe(rename("app.config.js"))
        .pipe(gulp.dest('src/app/'));
}

/**
 * creates config files
 * @return {Stream}
 */
gulp.task('config-dev', function () {
    var option, i = process.argv.indexOf("--env");
    if (i > -1) {
        option = process.argv[i + 1];
    }
    log('Configuring app: ' + option);

    return gulpConfig(option);
});

gulp.task('config-test', function () {
    return gulpConfig('test');
});

[resolved] npm certificate issues

Receiving the following error:

npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN

Upgrade your version of npm

npm install npm -g --ca=""

– OR –

Tell your current version of npm to use known registrars

<code>npm config set ca ""</code>

– OR –

Disable Strict-SSL 

npm config set strict-ssl false

 

– OR –

Switch from https to http 

npm config set registry="http://registry.npmjs.org/"