Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test debug mode can break sqlite3 #151

Closed
turadg opened this issue Apr 18, 2024 · 1 comment · Fixed by #178 · May be fixed by #155
Closed

test debug mode can break sqlite3 #151

turadg opened this issue Apr 18, 2024 · 1 comment · Fixed by #178 · May be fixed by #155

Comments

@turadg
Copy link
Member

turadg commented Apr 18, 2024

Problem

better_sqlite3.node is a binary dependency of many proposals. It's built with node-gyp and links to the Node binary.

The --debug option for the test command mounts the local filesystem on top of the Docker container's. If the local fs has a node_modules with an incompatible sqlite3 binary then you'll see an error like,

  Error {
    code: 'ERR_DLOPEN_FAILED',
    message: '/usr/src/proposals/a:upgrade-next/node_modules/better-sqlite3/build/Release/better_sqlite3.node: invalid ELF header',
  }

Workaround

Run yarn install within the Docker container to rebuild deps.

Long term fix

TBD. The local fs should have a node_modules so that types resolve. Ideally we could ignore node_modules through the mount. I don't know yet whether that's possible. @toliaqat ?

@mhofman
Copy link
Member

mhofman commented Apr 18, 2024

Ideally we could ignore node_modules through the mount. I don't know yet whether that's possible. @toliaqat ?

A mount is what it says, a direct mount of the whole directory. There is no filtering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants