Closed mohit-devops-azure closed 2 years ago
Looks like the specified version of node-sass (^4.14.1) is not compatible with node 16 (current default on ubuntu-20.04 hosted image). I managed to get around the failure in 2 ways (but I tested this as far as seeing a green tick on the pipeline run so can't comment on the effect on the built package).
According to npmjs.com - node-sass, node 16 requires node-sass 6.0+, or if you want to stick with the current version of node-sass (4.41.1) you need to use node 14 (still in support until 2023-04-30).
So to update node-sass to 6.0 you'll want to update the version in package.json
from ^4.14.1
to ^6.0.0
https://github.com/maciejporebski/mslearn-tailspin-spacegame-web-deploy/commit/72292b5cd0133e0d756d8a74005dce2c68c078d1
Or to use node 14 you can add a NodeTool@0
task with the input of versionSpec: '14.x'
to azure-pipelines.yml
just before the 'Run npm install' task.
https://github.com/maciejporebski/mslearn-tailspin-spacegame-web-deploy/commit/02aad5988931877b871e24143ec00f3ae350884d
Thanks @maciejporebski, both of your solution worked just fine and I am able to continue my training and practice demo exercises.
Hi, I am following the training on ESI portal where I have encountered this error in building the pipeline. The training section is "https://docs.microsoft.com/en-us/learn/modules/create-release-pipeline/5-deploy-to-appservice", here when I run the pipeline manually using the 'release-pipeline' branch as mentioned in the training I get an error that the 'package-lock.json file was created with an old version of npm'.
Error:
Can someone help ?