Giter Club home page Giter Club logo

Comments (5)

favna avatar favna commented on September 2, 2024

This is more than likely an issue with your system as it is failing while compiling a dependency that uses native (C++) code. Make sure you have a proper Python and C/C++ compiler. For most debian based linux operating systems that's available through sudo apt-get install -y build-essential python3 python3-pip

I tried to setup a new bot on a Windows based environment which does have the proper compile tools using the latest NodeJS version and it works just fine:
image

Likewise when using npm instead of yarn:
image

from cli.

juliavdkris avatar juliavdkris commented on September 2, 2024

Ahh I didn't notice it was compiling native code. I'm on Arch and have make, gcc, clang etc installed. But I just noticed the node-gyp README mentions needed Python 3.6 to 3.9, and I'm on 3.10. Though from this commit it seems like 3.10 is supported, but it just hasn't been added to the README yet. Which would make sense, because as far as I'm aware 3.10 didn't really introduce any changes that would be likely to break something.

Any idea of other things that could be breaking node-gyp? Sounds like it's an issue with them, and not Sapphire specifically, but thought I'd ask anyways :)

from cli.

favna avatar favna commented on September 2, 2024

Definitely an issue for them. As for anything else, no not really. You could set the path to the python binary in your global .npmrc (python=/usr/bin/python or whatever) but I doubt it would really change anything. We try to provide prebuilts but constantly supporting the latest nodejs version is big hell not to mention to dozens of different linux systems, glibc versions and more.

For now what you can do is replicate the new command of the CLI by manually getting the files it normally git clones, from https://github.com/sapphiredev/examples. Specifically the with-typescript-recommended folder which you chose by the looks of it. If you then want to use the CLI still to generate components you can see the "Existing project" dropdown here: https://www.sapphirejs.dev/docs/Guide/CLI/getting-started
(After getting the template you'll want to remove the @sapphire/type dependency if you still can't get it to compile, it is used for the eval command only)

from cli.

juliavdkris avatar juliavdkris commented on September 2, 2024

Alright, was worth a try. I'll try messing around a bit when I have more time. Either way, thanks for the help, really appreciate it! :)

from cli.

juliavdkris avatar juliavdkris commented on September 2, 2024

Update: reinstalling node didn't fix it, but deleting my /usr/lib/node_modules and then restarting did. Probably some global package I installed or something I overwrote during an update that messed things up

Just leaving this here in case someone else runs into the same obscure issue :)

from cli.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.