Installing @Forge/cli is bringing spawn ts-node ENOENT error

Sydney Cohen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 12, 2021

Following this tutorial: https://developer.atlassian.com/platform/forge/getting-started/

I'm on a Mac and I've followed those steps successfully: https://developer.atlassian.com/platform/forge/installing-forge-on-macos/

It seems its failing to exec the postinstall script.. But when getting to  npm install -g @forge/cli I have the following error:

 

npm install -g @forge/cli

/Users/soud/.nvm/versions/node/v12.22.6/bin/forge -> /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/@forge/cli/out/bin/cli.js

> keytar@5.6.0 install /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/@forge/cli/node_modules/keytar
> prebuild-install || node-gyp rebuild


> @forge/cli@2.0.2 postinstall /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/@forge/cli
> node -e "process.exitCode = fs.existsSync('./out/bin/postinstall.js')" || node ./out/bin/postinstall.js


ℹ To install autocompletion for Forge, run 'forge autocomplete install'.

events.js:291
throw er; // Unhandled 'error' event
^

Error: spawn ts-node ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn ts-node',
path: 'ts-node',
spawnargs: [
'/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/@forge/cli/out/workers/forge-cli-workers.ts',
'""'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @forge/cli@2.0.2 postinstall: `node -e "process.exitCode = fs.existsSync('./out/bin/postinstall.js')" || node ./out/bin/postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @forge/cli@2.0.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/soud/.npm/_logs/2021-10-12T08_22_31_693Z-debug.log

 

// details of the logs: 

 

20381 verbose lifecycle @forge/cli@2.0.2~postinstall: unsafe-perm in lifecycle true
20382 verbose lifecycle @forge/cli@2.0.2~postinstall: PATH: /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/@forge/cli/node_modules/.bin:/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/.bin:/Users/soud/.nvm/versions/node/v12.22.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/soud/.fig/bin
20383 verbose lifecycle @forge/cli@2.0.2~postinstall: CWD: /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/@forge/cli
20384 silly lifecycle @forge/cli@2.0.2~postinstall: Args: [
20384 silly lifecycle '-c',
20384 silly lifecycle `node -e "process.exitCode = fs.existsSync('./out/bin/postinstall.js')" || node ./out/bin/postinstall.js`
20384 silly lifecycle ]
20385 silly lifecycle @forge/cli@2.0.2~postinstall: Returned: code: 1 signal: null
20386 info lifecycle @forge/cli@2.0.2~postinstall: Failed to exec postinstall script
20387 timing action:postinstall Completed in 1146ms
20388 verbose unlock done using /Users/soud/.npm/_locks/staging-6b08d295ad269dee.lock for /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/.staging
20389 timing stage:rollbackFailedOptional Completed in 1945ms
20390 timing stage:runTopLevelLifecycles Completed in 18387ms
20391 verbose stack Error: @forge/cli@2.0.2 postinstall: `node -e "process.exitCode = fs.existsSync('./out/bin/postinstall.js')" || node ./out/bin/postinstall.js`
20391 verbose stack Exit status 1
20391 verbose stack at EventEmitter.<anonymous> (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
20391 verbose stack at EventEmitter.emit (events.js:314:20)
20391 verbose stack at ChildProcess.<anonymous> (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
20391 verbose stack at ChildProcess.emit (events.js:314:20)
20391 verbose stack at maybeClose (internal/child_process.js:1022:16)
20391 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
20391 verbose stack From previous event:
20391 verbose stack at runAction (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:74:13)
20391 verbose stack at actions.<computed> (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:50:17)
20391 verbose stack at execAction (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:191:18)
20391 verbose stack From previous event:
20391 verbose stack at /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:159:15
20391 verbose stack From previous event:
20391 verbose stack at withInit (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:175:13)
20391 verbose stack at runSerial (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:158:10)
20391 verbose stack at doSerial (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:139:3)
20391 verbose stack at Array.<anonymous> (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
20391 verbose stack at LOOP (/Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
20391 verbose stack at /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
20391 verbose stack at /Users/soud/.nvm/versions/node/v12.22.6/lib/node_modules/npm/lib/install/actions.js:163:5
20391 verbose stack at processImmediate (internal/timers.js:461:21)
20392 verbose pkgid @forge/cli@2.0.2
20393 verbose cwd /Users/soud/code/Axolo/jira
20394 verbose Darwin 20.6.0
20395 verbose argv "/Users/soud/.nvm/versions/node/v12.22.6/bin/node" "/Users/soud/.nvm/versions/node/v12.22.6/bin/npm" "install" "-g" "@forge/cli"
20396 verbose node v12.22.6
20397 verbose npm v6.14.15
20398 error code ELIFECYCLE
20399 error errno 1
20400 error @forge/cli@2.0.2 postinstall: `node -e "process.exitCode = fs.existsSync('./out/bin/postinstall.js')" || node ./out/bin/postinstall.js`
20400 error Exit status 1
20401 error Failed at the @forge/cli@2.0.2 postinstall script.
20401 error This is probably not a problem with npm. There is likely additional logging output above.
20402 verbose exit [ 1, true ]

 

 

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer