MicrosoftDocs / mslearn-tailspin-spacegame-web-deploy

Code used in Microsoft Learn modules to support Azure DevOps
https://aka.ms/devops-deploy
MIT License
35 stars 7.32k forks source link

The pipeline fails during the first build #122

Closed mohit-devops-azure closed 2 years ago

mohit-devops-azure commented 2 years ago

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: npm error

Can someone help ?

maciejporebski commented 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).

mohit-devops-azure commented 2 years ago

Thanks @maciejporebski, both of your solution worked just fine and I am able to continue my training and practice demo exercises.