I was having some issues with a project I created a few months ago, so I tried to create a new one just to check. I used the Sapphire CLI using npx (but also tried installing it globally, same result) but during the npm install
it runs at the end, I am getting some errors with downloading a specific version of the types library (which indeed doesn't exist in the GitHub releases). Tried generating one for plain JS instead of TypeScript, but it still tries to download this package.
And there's another error from node-gyp, which I honestly just don't really understand. It's related to a 'code-point-at'
package, which is apparently now deprecated in favor the builtin String.codePointAt
method. I don't see this dependency anywhere in this project though, so it could be an issue in node-gyp itself, or something with my setup?
❯ npx @sapphire/cli new --verbose
✔ What's the name of your project? … yeet
✔ Choose a language for your project › TypeScript (Recommended)
✔ Choose a template for your project › Default template (Recommended)
✔ What format do you want your config file to be in? › JSON
✔ What package manager do you want to use? › npm
✔ Do you want to create a git repository for this project? … no
⠋ Cloning the repositoryCloning into 'yeet/ghr'...
⠧ Cloning the repositoryremote: Enumerating objects: 986, done.
remote: Counting objects: 100% (986/986), done.
remote: Compressing objects: 100% (634/634), done.
remote: Total 986 (delta 577), reused 630 (delta 279), pack-reused 0
Receiving objects: 100% (986/986), 1.70 MiB | 6.37 MiB/s, done.
Resolving deltas: 100% (577/577), done.s: 92% (531/577)
✔ Cloning the repository
✔ Setting up the project
npm ERR! code 1
npm ERR! path /home/julia/yeet/node_modules/@sapphire/type
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/julia/yeet/node_modules/@sapphire/type/prebuild/type-node-v102-linux-x64-glibc-2.33/type.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/sapphiredev/type/releases/download/v2.1.2/type-v2.1.2-node-v102-linux-x64-glibc-2.33.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/sapphiredev/type/releases/download/v2.1.2/type-v2.1.2-node-v102-linux-x64-glibc-2.33.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @sapphire/[email protected] and [email protected] (node-v102 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/sapphiredev/type/releases/download/v2.1.2/type-v2.1.2-node-v102-linux-x64-glibc-2.33.tar.gz
npm ERR! node:internal/modules/cjs/loader:936
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'code-point-at'
npm ERR! Require stack:
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/string-width/index.js
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/wide-truncate.js
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
npm ERR! - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:999:19)
npm ERR! at require (node:internal/modules/cjs/helpers:102:18)
npm ERR! at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/string-width/index.js:3:19)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1097:14)
npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:975:32)
npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! at Module.require (node:internal/modules/cjs/loader:999:19) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/string-width/index.js',
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/wide-truncate.js',
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/render-template.js',
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/plumbing.js',
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/gauge/index.js',
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/npmlog/log.js',
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js',
npm ERR! '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js'
npm ERR! ]
npm ERR! }
npm ERR!
npm ERR! Node.js v17.3.0
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/julia/yeet/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1062:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.16.1-zen1-1-zen
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/julia/yeet/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/julia/yeet/node_modules/@sapphire/type
npm ERR! node-pre-gyp ERR! node -v v17.3.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.2
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/julia/.npm/_logs/2022-01-17T15_16_00_970Z-debug-0.log
✖ An unknown error occured while installing the dependencies. Try running Sapphire CLI with "--verbose" flag.
Error: An unknown error occured while installing the dependencies. Try running Sapphire CLI with "--verbose" flag.