marionebl / svg-term-cli

Share terminal sessions via SVG and CSS
MIT License
3.48k stars 116 forks source link

Install Instructions Not Working #95

Open JohnAlexCO opened 1 year ago

JohnAlexCO commented 1 year ago

Running the command from the readme.md results in a failure to install due to permissions.

username@username-MachineName:~$ npm install -g svg-term-cli
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/svg-term-cli
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/svg-term-cli'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/svg-term-cli'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/svg-term-cli'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2022-12-23T06_34_15_525Z-debug-0.log

The log file around line 930 repeats this same message. I tried removing the -g flag from the install command, and npm gave me warnings about the package containing known vulnerabilities

added 202 packages, and audited 469 packages in 21s

71 packages are looking for funding
  run `npm fund` for details

10 vulnerabilities (7 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

Proceeded to try the parrot example from the readme; I downloaded the parrot.json and ran the commands after it finished installing, and well.

user@user-MachineName:~/Desktop$ svg-term --cast=113643 --out parrot.svg --window
Could not find command-not-found database. Run 'sudo apt update' to populate it.
svg-term: command not found
user@user-MachineName:~/Desktop$ svg-term-cli
Could not find command-not-found database. Run 'sudo apt update' to populate it.
svg-term-cli: command not found
user@user-MachineName:~/Desktop$ 
JohnAlexCO commented 1 year ago

If it helps at all, this is the output of the audit:

up to date, audited 469 packages in 2s

71 packages are looking for funding
  run `npm fund` for details

# npm audit report

node-fetch  <=2.6.6
Severity: high
The `size` option isn't honored after following a redirect in node-fetch - https://github.com/advisories/GHSA-w7rc-rwvf-8q5r
node-fetch is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor - https://github.com/advisories/GHSA-r683-j2x4-v87g
No fix available
node_modules/svg-term-cli/node_modules/node-fetch
  svg-term-cli  *
  Depends on vulnerable versions of node-fetch
  Depends on vulnerable versions of svgo
  node_modules/svg-term-cli

nth-check  <2.0.1
Severity: high
Inefficient Regular Expression Complexity in nth-check - https://github.com/advisories/GHSA-rp65-9cf3-cjxr
No fix available
node_modules/nth-check
  css-select  <=3.1.0
  Depends on vulnerable versions of nth-check
  node_modules/css-select
    svgo  1.0.0 - 1.3.2
    Depends on vulnerable versions of css-select
    node_modules/svgo
      svg-term-cli  *
      Depends on vulnerable versions of node-fetch
      Depends on vulnerable versions of svgo
      node_modules/svg-term-cli

plist  <=3.0.4
Severity: critical
Prototype pollution in Plist before 3.0.5 can cause denial of service - https://github.com/advisories/GHSA-4cpg-3vgw-4877
Depends on vulnerable versions of xmldom
fix available via `npm audit fix`
node_modules/plist
  term-schemes  *
  Depends on vulnerable versions of plist
  node_modules/term-schemes

trim-newlines  <3.0.1
Severity: high
Uncontrolled Resource Consumption in trim-newlines - https://github.com/advisories/GHSA-7p7h-4mm5-852v
fix available via `npm audit fix`
node_modules/trim-newlines
  meow  3.4.0 - 5.0.0
  Depends on vulnerable versions of trim-newlines
  node_modules/meow

xmldom  *
Severity: critical
Misinterpretation of malicious XML input - https://github.com/advisories/GHSA-5fg8-2547-mr8q
Misinterpretation of malicious XML input - https://github.com/advisories/GHSA-h6q6-9hqw-rwfv
xmldom allows multiple root nodes in a DOM - https://github.com/advisories/GHSA-crh6-fp67-6883
fix available via `npm audit fix`
node_modules/xmldom
  plist  <=3.0.4
  Depends on vulnerable versions of xmldom
  node_modules/plist
    term-schemes  *
    Depends on vulnerable versions of plist
    node_modules/term-schemes

10 vulnerabilities (7 high, 3 critical)

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.