1
votes

Suddenly, my CI stopped with a series of errors, Im using Azure DevOps with Azure Web App Linux. Im getting several errors, and I can't figure out this:

[error]npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.

npm WARN [email protected] requires a peer of swiper@>=5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ENOENT npm ERR! syscall symlink npm ERR! path ../detect-port-alt/bin/detect-port npm ERR! dest /home/site/wwwroot/node_modules/.bin/detect npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, symlink '../detect-port-alt/bin/detect-port' -> '/home/site/wwwroot/node_modules/.bin/detect' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

npm ERR! A complete log of this run can be found in: npm ERR!
/home/.npm/_logs/2019-12-12T03_04_50_583Z-debug.log npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself. npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself. npm WARN @typescript-eslint/[email protected] requires a peer of typescript@* but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of swiper@>=5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev ||

= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.

npm ERR! code ENOENT npm ERR! syscall symlink npm ERR! path ../detect-port-alt/bin/detect-port npm ERR! dest /home/site/wwwroot/node_modules/.bin/detect npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, symlink '../detect-port-alt/bin/detect-port' -> '/home/site/wwwroot/node_modules/.bin/detect' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

1

1 Answers

0
votes

The peer dependencies missing error can be caused by incompatible dependencies(version of a peer dependency is higher than the version you have installed). You may need to run npm install in your pipeline to install and update your dependencies.

- script: npm install

or

- task: Npm@1
  inputs:
    command: 'install' 

You can also have a try installing each of the miss peer dependencies with its correct version in your pipeline.

- script: |
    npm install -g [email protected] --save
    npm install -g swiper@>=5.0.0 --save
    ...

You can check this similar thread for more information. For building react.js example you can refer to this document.