Coder Social home page Coder Social logo

Comments (2)

woodbri avatar woodbri commented on June 28, 2024

Here is the same problem using --import=sqlite3

$ node --import=sqlite3
node:internal/modules/cjs/loader:1464
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: A dynamic link library (DLL) initialization routine failed.
\\?\C:\msys64\home\woodbri\work\test-sqlite3\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-
x64\node_sqlite3.node
    at Module._extensions..node (node:internal/modules/cjs/loader:1464:18)
    at Module.load (node:internal/modules/cjs/loader:1205:32)
    at Module._load (node:internal/modules/cjs/loader:1021:12)
    at Module.require (node:internal/modules/cjs/loader:1230:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\msys64\home\woodbri\work\test-sqlite3\node_modules\sqlite3\lib\sqlite3
-binding.js:4:17)
    at Module._compile (node:internal/modules/cjs/loader:1368:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
    at Module.load (node:internal/modules/cjs/loader:1205:32)
    at Module._load (node:internal/modules/cjs/loader:1021:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v21.7.2

from node-sqlite3.

woodbri avatar woodbri commented on June 28, 2024

I was able to change this behavior by installing sqlite3 with:

pacman -S mingw-w64-x86_64-sqlite3

resulting in no longer getting the DLL error above but a different error as follows:

$ node inspect test2
< Debugger listening on ws://127.0.0.1:9229/cb31ec15-bf59-4346-bcd1-e4b56cf54276
< For help, see: https://nodejs.org/en/docs/inspector
<
connecting to 127.0.0.1:9229 ... ok
Break on start in test2:1
> 1 #!/usr/bin/env node
  2
  3 import sqlite3 from 'sqlite3';
debug> n
debug> There was an internal error in Node.js. Please report this bug.
read ECONNRESET
Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
    at TCP.callbackTrampoline (node:internal/async_hooks:130:17)
node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: kill EPERM
    at ChildProcess.kill (node:internal/child_process:512:26)
    at process.handleUnexpectedError (node:internal/debugger/inspect:360:42)
    at process.emit (node:events:531:35)
    at process.emit (node:domain:488:12)
    at process._fatalException (node:internal/process/execution:178:25)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess.kill (node:internal/child_process:512:12)
    at process.handleUnexpectedError (node:internal/debugger/inspect:360:42)
    [... lines matching original stack trace ...]
    at process._fatalException (node:internal/process/execution:178:25) {
  errno: -4048,
  code: 'EPERM',
  syscall: 'kill'
}

Node.js v21.7.2

from node-sqlite3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.