Reputation: 53
I had a question about Visual Studio Code & gulp.
I'm using typescript version 3.7.2 with the latest version of Visual Studio Code. When I run gulp build, I get the following output:
[12:03:36] Starting gulp
[12:03:36] Starting 'build'...
[12:03:36] Starting subtask 'configure-sp-build-rig'...
[12:03:36] Finished subtask 'configure-sp-build-rig' after 6.42 ms
[12:03:36] Starting subtask 'pre-copy'...
[12:03:36] Finished subtask 'pre-copy' after 55 ms
[12:03:36] Starting subtask 'copy-static-assets'...
[12:03:36] Starting subtask 'sass'...
[12:03:37] Finished subtask 'sass' after 1.38 s
[12:03:37] Starting subtask 'tslint'...
[12:03:39] [tslint] tslint version: 5.12.1
[12:03:39] Starting subtask 'tsc'...
[12:03:39] [tsc] typescript version: 2.9.2
[12:03:40] Finished subtask 'copy-static-assets' after 4.46 s
[12:03:48] Finished subtask 'tslint' after 10 s
[12:03:49] Finished subtask 'tsc' after 10 s
[12:03:49] Starting subtask 'post-copy'...
[12:03:49] Finished subtask 'post-copy' after 428 μs
[12:03:49] Finished 'build' after 14 s
[12:03:50] ==================[ Finished ]==================
My question is about 1 line specifically:
[12:03:39] [tsc] typescript version: 2.9.2
Why is it using typescript version 2.9.2 when I have 3.7.2 installed? Is there a way to change this?
Edit:
full gulpfile.js
'use strict';
const gulp = require('gulp');
const build = require('@microsoft/sp-build-web');
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
// Taken from: https://blog.mastykarz.nl/correctly-reference-images-sharepoint-framework-solutions/
build.configureWebpack.mergeConfig({
additionalConfiguration: generatedConfiguration => {
if (build.getConfig().production) {
var basePath = build.writeManifests.taskConfig.cdnBasePath;
if (!basePath.endsWith('/')) {
basePath += '/';
}
generatedConfiguration.output.publicPath = basePath;
}
else
{
generatedConfiguration.output.publicPath = '/dist/';
}
return generatedConfiguration;
},
});
build.initialize(gulp);
I'm using gulp 3.9.1. I tried upgrading but ran into issues so I had to downgrade.
Upvotes: 1
Views: 102
Reputation: 53
I found an article that led me in the right direction HERE. Now I see the following:
[tsc] typescript version: 3.3.4000
Still not using 3.7.2 but, I guess it's good enough. Hope this helps someone else...
Upvotes: 2