NPM package on alpine linux not working
See original GitHub issueHi, 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:
- Created 2 years ago
- Comments:6
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
libstdc++ is embedded in Mega-Linter docker image, so not sure it’s the cause of the error 😕
Not stale 😦