ganache icon indicating copy to clipboard operation
ganache copied to clipboard

fail to install and run ganache

Open vanilingys99 opened this issue 1 year ago • 3 comments

When npm install ganache --global

npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     undefined,
npm WARN cleanup     AssertionError [ERR_ASSERTION]: rimraf: missing path
npm WARN cleanup         at rimraf (C:\Program Files\nodejs\node_modules\npm\node_modules\rimraf\rimraf.js:54:3)
npm WARN cleanup         at node:internal/util:360:7
npm WARN cleanup         at new Promise (<anonymous>)
npm WARN cleanup         at rimraf (node:internal/util:346:12)
npm WARN cleanup         at C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:528:20
npm WARN cleanup         at Array.map (<anonymous>)
npm WARN cleanup         at Arborist.[rollbackCreateSparseTree] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:528:8)
npm WARN cleanup         at C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:1074:50
npm WARN cleanup         at async Arborist.[reifyPackages] (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:231:11)
npm WARN cleanup         at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:151:5) {
npm WARN cleanup       generatedMessage: false,
npm WARN cleanup       code: 'ERR_ASSERTION',
npm WARN cleanup       actual: undefined,
npm WARN cleanup       expected: true,
npm WARN cleanup       operator: '=='
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\vanyk\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\bufferutil',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vanyk\AppData\Roaming\npm\node_modules\ganache\node_modules\bufferutil'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\vanyk\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\bufferutil'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\vanyk\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\utf-8-validate',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\vanyk\AppData\Roaming\npm\node_modules\ganache\node_modules\utf-8-validate'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\vanyk\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\utf-8-validate'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\vanyk\AppData\Roaming\npm\node_modules\ganache\node_modules\leveldown
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp-build
npm ERR! 'node-gyp-build' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\vanyk\AppData\Local\npm-cache\_logs\2022-09-15T12_55_52_877Z-debug.log

vanilingys99 avatar Sep 15 '22 12:09 vanilingys99

Can you provide more information about your system? Os, node version, npm version, etc?

davidmurdoch avatar Sep 15 '22 18:09 davidmurdoch

I'm having the same issue. Here are some of my system informations. OS: Windows 10 node: v16.13.0 npm: 8.1.0

AngelPn avatar Oct 17 '22 08:10 AngelPn

@AngelPn can you paste the output of npm install ganache@latest -g?

davidmurdoch avatar Oct 17 '22 14:10 davidmurdoch

@davidmurdoch Here is the output:

npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\ap\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\bufferutil',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\ap\AppData\Roaming\npm\node_modules\ganache\node_modules\bufferutil'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\ap\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\bufferutil'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\Users\\ap\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\utf-8-validate',
npm WARN cleanup     [Error: EBUSY: resource busy or locked, rmdir 'C:\Users\ap\AppData\Roaming\npm\node_modules\ganache\node_modules\utf-8-validate'] {
npm WARN cleanup       errno: -4082,
npm WARN cleanup       code: 'EBUSY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\Users\\ap\\AppData\\Roaming\\npm\\node_modules\\ganache\\node_modules\\utf-8-validate'npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\ap\AppData\Roaming\npm\node_modules\ganache\node_modules\leveldown
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build
npm ERR! 'node-gyp-build' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ap\AppData\Local\npm-cache\_logs\2022-10-18T15_16_40_205Z-debug.log

AngelPn avatar Oct 18 '22 15:10 AngelPn

Hi @AngelPn,

I was able to install Ganache without issues on Windows 10 (Node v16.18.0, npm v8.19.2). Can you try with latest Node v16?

cds-amal avatar Oct 20 '22 20:10 cds-amal