0

Running this in my terminal: npm i --save-dev typescript 'https://gitpkg.now.sh/pylonbot/pylon-sdk-types/runtime' 'https://gitpkg.now.sh/pylonbot/pylon-sdk-types/runtime-discord'
Installs the packages as would be expected. But, when I try to use child_process's execSync to install these packages the installation fails. The code:

try {
  child_process.execSync(`npm i --save-dev typescript 'https://gitpkg.now.sh/pylonbot/pylon-sdk-types/runtime' 'https://gitpkg.now.sh/pylonbot/pylon-sdk-types/runtime-discord'`);
} catch(e) {
  console.log(e);
  process.exit();
} finally {
  console.log('It worked!');
}

Output:

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\me\test\'https:\gitpkg.now.sh\pylonbot\pylon-sdk-types\runtime'/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\me\test\'https:\gitpkg.now.sh\pylonbot\pylon-sdk-types\runtime'\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Interestingly, it only fails when the gitpkgs are included (gitpkg is a tool that lets you install packages from github subdirs)
Sorry in advance if this is something stupid, but I can't figure it out.

liamhtml
  • 21
  • 1
  • 4

1 Answers1

0

For whatever reason, removing the quotes around the gitpkg link fixed this.

liamhtml
  • 21
  • 1
  • 4