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 package on alpine linux not working

See original GitHub issue

Hi, I’m currently integrating tsqllint in Mega-Linter, which is based on an alpine linux docker image

Installation using npm works well ( tsqllint@1.11.0 ) , but during run there is some fatal error, even with only tsqllint --help

1 node:events:355
      throw er; // Unhandled 'error' event
      ^

Error: spawn /node_modules/tsqllint/assemblies/linux-x64/TSQLLint.Console ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:81:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /node_modules/tsqllint/assemblies/linux-x64/TSQLLint.Console',
  path: '/node_modules/tsqllint/assemblies/linux-x64/TSQLLint.Console',
  spawnargs: [ '--help' ]

Same for linting a file:

[tsqllint] command: ['tsqllint', '/tmp/lint/.automation/test/sql_tsql/sql_good_1.sql']
[tsqllint] CWD: /
[tsqllint] result: 1 node:events:355
      throw er; // Unhandled 'error' event
      ^

Error: spawn /node_modules/tsqllint/assemblies/linux-x64/TSQLLint.Console ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:81:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /node_modules/tsqllint/assemblies/linux-x64/TSQLLint.Console',
  path: '/node_modules/tsqllint/assemblies/linux-x64/TSQLLint.Console',
  spawnargs: [ '/tmp/lint/.automation/test/sql_tsql/sql_good_1.sql' ]
}

Maybe adding some apk dependencies could help ?

Note: i’m using apk nodejs-current (version 15.10.0-r0)

Thanks !

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
nvuillamcommented, Jul 29, 2021

libstdc++ is embedded in Mega-Linter docker image, so not sure it’s the cause of the error 😕

0reactions
nvuillamcommented, Oct 2, 2021

Not stale 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to install npm in alpine linux
The issue here is a recent one and is due to changes in Alpine's package repositories between v3. 5 and v3.
Read more >
Automatically installing NodeJS/NPM is not working on ...
Install nodejs and npm via the package manager (apk). # Install latest LTS ... The correct npm/nodejs is installed for Alpine Linux/musl.
Read more >
Installing specific version of NodeJS and NPM on Alpine ...
I need to use a standard Alpine docker image and install a specific version of Node and NPM. Heres is my attempt so...
Read more >
Making Our Own Alpine Node.js Container
As an exercise to understand what goes into making a container from scratch, Brian shows how to create a Node.js container from the...
Read more >
How to install a specific Node.js version in an alpine ...
1, Use a binary ... This isn't as easy as it sounds. Simply using the official Node binary of your platform will fail...
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