This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

npm ci command not working. When I'm installing the cat tracker web application

Hey, I'm trying to install the cat tracker application. When I'm executing the npm ci command. It is prompting the following error

ubuntu@ip-172-31-25-55:~/aws/nrf-asset-tracker-firmware-aws/cat-tracker-web-app$ npm ci
npm ERR! fsevents not accessible from jest-haste-map

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2021-05-29T15_17_05_201Z-debug.log

Can anyone help me in solving this. 

Parents
  • I can't reproduce this:

    root@42a4b26c6299:/asset-tracker-cloud-app-js# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 18.04.5 LTS
    Release:        18.04
    Codename:       bionic
    root@42a4b26c6299:/asset-tracker-cloud-app-js# node -v
    v14.17.0
    root@42a4b26c6299:/asset-tracker-cloud-app-js# npm -v
    7.15.1
    root@42a4b26c6299:/asset-tracker-cloud-app-js# npm ci
    npm WARN deprecated [email protected]: Deprecated due to CVE-2021-21366 resolved in 0.5.0
    npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
    npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
    npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
    npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
    npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
    npm WARN deprecated [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
    npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
    npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
    npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
    
    > @nordicsemiconductor/[email protected] postinstall
    > husky install
    
    husky - Git hooks installed
    
    added 4097 packages, and audited 4098 packages in 45s
    
    177 packages are looking for funding
      run `npm fund` for details
    
    87 vulnerabilities (2 low, 84 moderate, 1 high)
    
    To address issues that do not require attention, run:
      npm audit fix
    
    To address all issues (including breaking changes), run:
      npm audit fix --force
    
    Run `npm audit` for details.
    root@42a4b26c6299:/asset-tracker-cloud-app-js# 
    

    Which version of Node.js and NPM do you have?

  • After upgrading to NPM v7, it is still in the same place:

    root@f0171301951f:/# npm install --global npm
    /usr/bin/npx -> /usr/lib/node_modules/npm/bin/npx-cli.js
    /usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
    + [email protected]
    added 60 packages from 23 contributors, removed 241 packages and updated 194 packages in 6.621s
    root@f0171301951f:/# npx -v
    7.15.1
    root@f0171301951f:/# which npx
    /usr/bin/npx
    root@f0171301951f:/# 
    

  • Markus,


    Please let me know if you need any other info

  • It's pulling in a different version.

    Did you modify your package-lock.json?

    Can you show me the output of `git status`?

    Because, I can't reproduce this on Ubuntu 18.04:

    root@b7ce4d072251:/# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 18.04.5 LTS
    Release:        18.04
    Codename:       bionic
    root@b7ce4d072251:/# node -v                            
    v14.17.0
    root@b7ce4d072251:/# npm -v
    7.15.1
    root@b7ce4d072251:/# git clone --branch v1.5.x --single-branch   https://github.com/NordicSemiconductor/asset-tracker-cloud-app-js.git cat-tracker-web-app      
    Cloning into 'cat-tracker-web-app'...
    remote: Enumerating objects: 7717, done.
    remote: Counting objects: 100% (520/520), done.
    remote: Compressing objects: 100% (250/250), done.
    remote: Total 7717 (delta 379), reused 329 (delta 269), pack-reused 7197
    Receiving objects: 100% (7717/7717), 34.45 MiB | 8.83 MiB/s, done.
    Resolving deltas: 100% (5519/5519), done.
    root@b7ce4d072251:/# cd cat-tracker-web-app/
    root@b7ce4d072251:/cat-tracker-web-app# npm ci
    npm run build[..................] \ reify: timing npm-ci:rm Completed in 0ms
    npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
    npm WARN deprecated [email protected]: this library is no longer supported
    npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
    npm WARN deprecated [email protected]: Deprecated due to CVE-2021-21366 resolved in 0.5.0
    npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
    npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
    npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
    npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
    npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
    npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated [email protected]: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
    npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
    npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
    npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
    
    > @nordicsemiconductor/[email protected] postinstall
    > husky install
    
    husky - Git hooks installed
    
    added 4048 packages, and audited 4049 packages in 27s
    
    171 packages are looking for funding
      run `npm fund` for details
    
    94 vulnerabilities (2 low, 91 moderate, 1 high)
    
    To address issues that do not require attention, run:
      npm audit fix
    
    To address all issues (including breaking changes), run:
      npm audit fix --force
    
    Run `npm audit` for details.
    root@b7ce4d072251:/cat-tracker-web-app# npm run build
    
    > @nordicsemiconductor/[email protected] build
    > react-scripts --max_old_space_size=4096 build
    
    Creating an optimized production build...
    Compiled successfully.
    
    File sizes after gzip:
    
      937.03 KB  build/static/js/10.ce25e855.chunk.js
      516.66 KB  build/static/js/5.b843f73b.chunk.js
      423.77 KB  build/static/js/0.af763936.chunk.js
      340.54 KB  build/static/js/11.c595ef95.chunk.js
      42.78 KB   build/static/js/8.207a0ed3.chunk.js
      41.35 KB   build/static/js/9.421e14dc.chunk.js
      34.06 KB   build/static/js/6.824d30cf.chunk.js
      11.21 KB   build/static/js/1.8795c3ad.chunk.js
      10.96 KB   build/static/js/7.2522273a.chunk.js
      7.35 KB    build/static/js/12.72c6a695.chunk.js
      3.61 KB    build/static/css/5.057e68f0.chunk.css
      1.63 KB    build/static/js/runtime-main.daed0ca0.js
      1.18 KB    build/static/js/main.b40fa104.chunk.js
      176 B      build/static/js/xlsx.44d5e088.chunk.js
    
    The project was built assuming it is hosted at /NordicSemiconductor/asset-tracker-cloud-app-js.
    You can control this with the homepage field in your package.json.
    
    The build folder is ready to be deployed.
    
    Find out more about deployment here:
    
      https://cra.link/deployment
    
    

  • Markus,


    I didn't change the package-lock.json. Please have a look at the screenshot attached

  • As I did suspect, the package.json and package-lock.json are modified. Please revert all changes to package-lock.json (it will be modified if running `npm i` (not `npm ci`)), and run `npm ci` again.

    Then try the build step again.

  • Markus,

    I did as you told, 

    First, I ran the commands npm I and then npm ci. It is giving me the same error.

Reply Children
Related