Forge Command Line Tool Not Working for 2.8.x


We are trying to use the Forge command-line tool.
We are following the commands mentioned in the following URL,

However, it is giving us the error as below

sudo npm i @triggercorp/forge --save
npm WARN deprecated request@2.88.2: request has been deprecated, see

@triggercorp/forge@3.5.4 preinstall /Users/macuser/node_modules/@triggercorp/forge
node scripts/preinstall.js

preinstall:info executing preinstall.js on darwin_x64_19.4.0 (darwin)
preinstall:error Fatal error: Error: EACCES: permission denied, mkdir ‘bin’
preinstall:stack Error: EACCES: permission denied, mkdir ‘bin’
preinstall:stack at Object.mkdirSync (fs.js:775:3)
preinstall:stack at main (/Users/macuser/node_modules/@triggercorp/forge/scripts/preinstall.js:31:12)
preinstall:stack at Object. (/Users/macuser/node_modules/@triggercorp/forge/scripts/preinstall.js:129:1)
preinstall:stack at Module._compile (internal/modules/cjs/loader.js:721:30)
preinstall:stack at Object.Module._extensions…js (internal/modules/cjs/loader.js:732:10)
preinstall:stack at Module.load (internal/modules/cjs/loader.js:620:32)
preinstall:stack at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
preinstall:stack at Function.Module._load (internal/modules/cjs/loader.js:552:3)
preinstall:stack at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
preinstall:stack at executeUserCode (internal/bootstrap/node.js:342:17)
npm WARN enoent ENOENT: no such file or directory, open ‘/Users/macuser/package.json’
npm WARN macuser No description
npm WARN macuser No repository field.
npm WARN macuser No README data
npm WARN macuser No license field.

npm ERR! errno 1
npm ERR! @triggercorp/forge@3.5.4 preinstall: node scripts/preinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @triggercorp/forge@3.5.4 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Unless you know exactly what the effect will be, using the sudo command is rarely the right answer!

Can you try:

mkdir my_app
cd my_app
npm init

npm i @triggercorp/forge --save
npx forge create

If this still fails, can you please also paste the output of:

npm --version
node --version