question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPM CI error: nice-napi not accessible from piscina

See original GitHub issue

Package.json:

{
    "name": "sample",
    "version": "0.0.1",
    "license": "MIT",
    "engines": {
        "node": "12"
    },
    "scripts": {
        ....some scripts
    },
    "private": true,
    "dependencies": {
        "@angular/animations": "12.2.0",
        "@angular/cdk": "12.2.0",
        "@angular/common": "12.2.0",
        "@angular/compiler": "12.2.0",
        "@angular/core": "12.2.0",
        "@angular/fire": "7.0.0",
        "@angular/forms": "12.2.0",
        "@angular/material": "12.2.0",
        "@angular/platform-browser": "12.2.0",
        "@angular/platform-browser-dynamic": "12.2.0",
        "@angular/router": "12.2.0",
        "@angular/service-worker": "12.2.0",
        "@google-cloud/logging": "9.6.0",
        "@nestjs/axios": "0.0.1",
        "@nestjs/common": "8.0.6",
        "@nestjs/config": "1.0.1",
        "@nestjs/core": "8.0.6",
        "@nestjs/platform-express": "8.0.6",
        "@nrwl/angular": "12.6.5",
        "class-transformer": "0.4.0",
        "class-validator": "0.13.1",
        "cls-hooked": "4.2.2",
        "cookie-parser": "1.4.5",
        "date-fns": "2.23.0",
        "fast-xml-parser": "3.20.0",
        "firebase": "9.0.0",
        "firebase-admin": "9.11.1",
        "firebase-functions": "3.15.4",
        "flat": "5.0.2",
        "helmet": "4.6.0",
        "lodash": "4.17.21",
        "nanoid": "3.1.25",
        "reflect-metadata": "0.1.13",
        "rxfire": "6.0.0",
        "rxjs": "7.3.0",
        "tslib": "2.0.0",
        "zone.js": "0.11.4"
    },
    "devDependencies": {
        "@angular-builders/custom-webpack": "12.1.0",
        "@angular-devkit/architect": "0.1200.0",
        "@angular-devkit/build-angular": "12.2.0",
        "@angular-eslint/eslint-plugin": "12.3.1",
        "@angular-eslint/eslint-plugin-template": "12.3.1",
        "@angular-eslint/template-parser": "12.3.1",
        "@angular/cli": "12.2.0",
        "@angular/compiler-cli": "12.2.0",
        "@angular/language-service": "12.2.0",
        "@firebase/rules-unit-testing": "2.0.0",
        "@firebase/testing": "0.20.11",
        "@nestjs/schematics": "8.0.2",
        "@nestjs/swagger": "5.0.9",
        "@nestjs/testing": "8.0.6",
        "@nrwl/cli": "12.6.5",
        "@nrwl/eslint-plugin-nx": "12.6.5",
        "@nrwl/jest": "12.6.5",
        "@nrwl/linter": "12.6.5",
        "@nrwl/nest": "12.6.5",
        "@nrwl/node": "12.6.5",
        "@nrwl/tao": "12.6.5",
        "@nrwl/workspace": "12.6.5",
        "@types/cls-hooked": "4.3.3",
        "@types/cookie-parser": "1.4.2",
        "@types/flat": "5.0.2",
        "@types/jest": "26.0.24",
        "@types/node": "14.14.33",
        "@types/supertest": "2.0.11",
        "@typescript-eslint/eslint-plugin": "3.9.1",
        "@typescript-eslint/parser": "3.8.0",
        "copy-webpack-plugin": "9.0.1",
        "dotenv": "10.0.0",
        "eslint": "7.22.0",
        "eslint-config-google": "0.14.0",
        "eslint-config-prettier": "8.1.0",
        "eslint-plugin-import": "2.22.0",
        "firebase-functions-test": "0.3.2",
        "firebase-tools": "9.16.6",
        "fuzzy": "0.1.3",
        "inquirer": "6.2.2",
        "inquirer-autocomplete-prompt": "1.0.1",
        "jest": "27.0.3",
        "jest-preset-angular": "9.0.4",
        "jsonc-parser": "3.0.0",
        "ng-packagr": "12.1.0",
        "open": "7.0.3",
        "prettier": "2.3.2",
        "rimraf": "3.0.2",
        "supertest": "6.1.4",
        "swagger-ui-express": "4.1.6",
        "ts-essentials": "7.0.3",
        "ts-jest": "27.0.4",
        "ts-node": "9.1.1",
        "type-fest": "2.3.2",
        "typescript": "4.3.5",
        "webpack": "5.47.0",
        "webpack-merge": "5.8.0",
        "webpack-node-externals": "3.0.0"
    }
}

Github action:

name: Test pull request

on:
  pull_request:
    branches: [ develop ]
    paths-ignore:
      - 'apps/test/**'
      - 'apps/test-e2e/**'
      - 'libs/angular/**'

jobs:
  test_server_pull_request:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-node@master
        with:
          node-version: 12
      - run: npm ci
      (...more build commands)

Then it found in cache the setup-node@master

Run actions/setup-node@master
Found in cache @ /opt/hostedtoolcache/node/12.22.6/x64

On npm ci, the action ends in error:

Run npm ci
npm ERR! nice-napi not accessible from piscina

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-09-25T17_41_55_324Z-debug.log
Error: Process completed with exit code 1.

This action just stopped working without any change on the code base or its dependencies. Any clue?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dmitry-shibanovcommented, Oct 18, 2021

Hello @raitisbe. Thank you for your response. I think the problem is related to links and dependencies in package-lock.json. The npm ci command does not change package-lock.json. The npm i command can update dependencies, that is why I think the root cause of the issue comes from some of the project’s dependencies.

For now I’m closing the issue. If you have any concerns feel free to ping us.

1reaction
raitisbecommented, Oct 15, 2021

+1 having this also on node 14 In our case it was after adding dependency to geotiff.js. Might be just a coincidence

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github action: NPM CI error: nice-napi not accessible from ...
I resolved this error by updating my nodeJs to v16 and npm to v8 in my Build environment. My local environment sneakily upgraded...
Read more >
NPM CI error: nice-napi not accessible from piscina-node.js
I resolved this error by updating my nodeJs to v16 and npm to v8 in my Build environment. My local environment sneakily upgraded...
Read more >
piscina - npm
piscina - the node.js worker pool. CI. ✓ Fast communication between threads; ✓ Covers both fixed-task and variable-task scenarios ...
Read more >
[BUG] npm ci installs an optional dependency which targets a ...
So while npm ci fails in my environment, npm ci --no-optional works. My environment: Windows 10; Nodejs 12.13.1; npm 6.13.4 ...
Read more >
nice-napi - npm Package Health Analysis - Snyk
Is nice-napi safe to use? The npm package nice-napi was scanned for known vulnerabilities and missing license, and no issues were found. Thus...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found