I got the follwing error trying to use trash
on my laptop(Apple M1 Pro).
Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:412:11)
at spawn (node:child_process:698:9)
at execFile (node:child_process:325:17)
at node:child_process:235:21
at chunkedExec ...
...
The first line made me think it was an issue related to the hardware so I pulled the repo and ran the build script ./build
.
The build script will create a binary and move it to the root of the repo and works without issue.
I replaced the macOS binary that I got when I ran npm i -g trash-cli
.
cp ~/macos-trash/trash ~/.nvm/versions/node/v16.13.0/lib/node_modules/trash-cli/node_modules/trash/lib/macos-tra
sh
I use nvm
so your node
location might be different than mine but you should be able to find it with which node
➜ ~ which node
~/.nvm/versions/node/v16.13.0/bin/node