Skip to content

Yarn install fails when trying to install mongodb-memory-server on a Github hosted runner #803

Closed
@Patrickkooijman

Description

@Patrickkooijman

Versions

  • NodeJS: 18
  • mongodb-memory-server-*: 8.15.1
  • mongodb(the binary version): 5.0.19
  • mongodb(the js package): 5.0.2
  • mongoose: 7.5.3
  • system: ubuntu-22.04

package: mongo-memory-server

What is your question?

I'm running into an issue with installing this dependency on a Github hosted runner. When it's installing the dependencies using yarn install everything looks normal, but suddenly it exits with an exit code 1, throwing this error.

error An unexpected error occurred: "/home/runner/work/product-availability-service/product-availability-service/node_modules/mongodb-memory-server: Cannot read properties of undefined (reading 'config')".

I have the feeling this is thrown by the post-install script, but I'm not 100%. Also tried to get more debug logs, but that didn't result into more details, also not with the debug flag. Also trying to disable the post-install script using the disablePostinstall didn't solve the issue.

But the weirdest thing is, sometimes it works, sometimes it doesn't. I.e. on attempt #1 it failed, on attempt #2 it succeeded and on attempt #3 it failed again. When it succeeds, above error is not shown. I'm using this version for about a month, and until last Friday all worked as expected.

Hopefully someone has experienced this before and can point me into the right direction.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions