mhassan1 / redis-memory-server

Redis Server for testing. The server will allow you to connect your favorite client library to the Redis Server and run parallel integration tests isolated from each other.
MIT License
76 stars 11 forks source link

Error when running npm ci since version 0.7.0 #20

Closed elovin closed 1 year ago

elovin commented 1 year ago

Hi I get the following error since version 0.7.0 when I run npm ci

1822 error command failed
1823 error command sh -c node ./scripts/postinstall
1824 error redis-memory-server: checking Redis binaries cache...
1824 error Downloading Redis stable: 0 % (0mb / 2.9mb)
1824 error failed to download/install Redis binaries. The error: TypeError: (0 , rimraf_1.rimraf) is not a function
1825 verbose exit 1

It works when I add rimraf to the npm overwrites:

    "overrides": {
        "rimraf": "^5.0.1"
    },

npm debug logs:

1805 info run redis-memory-server@0.7.0 postinstall node_modules/redis-memory-server node ./scripts/postinstall
1806 info run mongodb-memory-server@8.13.0 postinstall { code: 0, signal: null }
1807 timing build:run:postinstall:node_modules/mongodb-memory-server Completed in 99ms
1808 info run @nestjs/core@10.0.5 postinstall { code: 0, signal: null }
1809 timing build:run:postinstall:node_modules/@nestjs/core Completed in 267ms
1810 info run redis-memory-server@0.7.0 postinstall { code: 1, signal: null }
1811 timing reify:rollback:createSparse Completed in 2336ms
1812 timing reify:rollback:retireShallow Completed in 0ms
1813 timing command:ci Completed in 28394ms
1814 verbose stack Error: command failed
1814 verbose stack     at ChildProcess.<anonymous> (/Users/elovin/Library/Application Support/fnm/node-versions/v18.16.0/installation/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
1814 verbose stack     at ChildProcess.emit (node:events:513:28)
1814 verbose stack     at maybeClose (node:internal/child_process:1091:16)
1814 verbose stack     at Socket.<anonymous> (node:internal/child_process:449:11)
1814 verbose stack     at Socket.emit (node:events:513:28)
1814 verbose stack     at Pipe.<anonymous> (node:net:322:12)
1815 verbose pkgid redis-memory-server@0.7.0

1817 verbose Darwin 22.5.0
1818 verbose node v18.16.0
1819 verbose npm  v9.5.1
1820 error code 1

1822 error command failed
1823 error command sh -c node ./scripts/postinstall
1824 error redis-memory-server: checking Redis binaries cache...
1824 error Downloading Redis stable: 0 % (0mb / 2.9mb)
1824 error failed to download/install Redis binaries. The error: TypeError: (0 , rimraf_1.rimraf) is not a function
1825 verbose exit 1
mhassan1 commented 1 year ago

I am unable to replicate. This seems like an issue with dependency resolution; redis-memory-server already uses rimraf@^5.0.1, so I'm not sure why setting an override would fix it.

Are you able to provide a minimal reproduction?

elovin commented 1 year ago

Hi @mhassan1 , thanks for the fast response.

It is probably a problem on my end then.

elovin commented 1 year ago

FYI @mhassan1 I checked again and yes it was indeed a problem with my setup, sorry for the trouble.