Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building locally #862

Open
LarryMerino opened this issue Apr 5, 2025 · 5 comments
Open

Error building locally #862

LarryMerino opened this issue Apr 5, 2025 · 5 comments

Comments

@LarryMerino
Copy link

I tried to access the website https://ratatui.rs/ but wasn’t able to, as the connection couldn’t be established for some reason
I was able to access the site from my phone, though, so I know the website is up—I just don’t understand why I can’t reach it from my computer

In any case, since I couldn’t access the site from my PC, I decided to build the site locally instead, but I don’t understand why it fails when I try to start the server.

I ran the following commands:

git clone https://github.com/ratatui/ratatui-website/
cd ratatui-website

git lfs install
git lfs pull

npm install
npm run dev

And this is the output:

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated puppeteer@18.2.1: < 22.8.2 is no longer supported
npm error code 1
npm error path /home/larry/software/sandbox/ratatui-tutorial/ratatui-website/node_modules/tree-sitter
npm error command failed
npm error command sh -c node-gyp-build
npm error make: se entra en el directorio '/home/larry/software/sandbox/ratatui-tutorial/ratatui-website/node_modules/tree-sitter/build'
npm error   TOUCH Release/obj.target/../node-addon-api/node_addon_api_except.stamp
npm error   CC(target) Release/obj.target/tree_sitter/vendor/tree-sitter/lib/src/lib.o
npm error rm -f Release/obj.target/tree_sitter.a Release/obj.target/tree_sitter.a.ar-file-list; mkdir -p `dirname Release/obj.target/tree_sitter.a`
npm error ar crs Release/obj.target/tree_sitter.a @Release/obj.target/tree_sitter.a.ar-file-list
npm error   COPY Release/tree_sitter.a
npm error   CXX(target) Release/obj.target/tree_sitter_runtime_binding/src/binding.o
npm error make: se sale del directorio '/home/larry/software/sandbox/ratatui-tutorial/ratatui-website/node_modules/tree-sitter/build'
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@11.1.0
npm error gyp info using node@23.11.0 | linux | x64
npm error gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm error gyp info spawn /usr/bin/python3
npm error gyp info spawn args [
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'make',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/larry/software/sandbox/ratatui-tutorial/ratatui-website/node_modules/tree-sitter/build/config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args '/home/larry/.cache/node-gyp/23.11.0/include/node/common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=/home/larry/.cache/node-gyp/23.11.0',
npm error gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=/home/larry/.cache/node-gyp/23.11.0/<(target_arch)/node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=/home/larry/software/sandbox/ratatui-tutorial/ratatui-website/node_modules/tree-sitter',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn make
npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error g++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
npm error make: *** [tree_sitter_runtime_binding.target.mk:130: Release/obj.target/tree_sitter_runtime_binding/src/binding.o] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `make` failed with exit code: 2
npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
npm error gyp ERR! System Linux 5.15.0-134-generic
npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm error gyp ERR! cwd /home/larry/software/sandbox/ratatui-tutorial/ratatui-website/node_modules/tree-sitter
npm error gyp ERR! node -v v23.11.0
npm error gyp ERR! node-gyp -v v11.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: /home/larry/.npm/_logs/2025-04-05T14_41_02_722Z-debug-0.log

What could I be doing wrong?

@kdheepak
Copy link
Contributor

kdheepak commented Apr 6, 2025

Thanks for reporting. What operating system are you using? Is this failing on npm install?

I'm surprised treesitter is being built here, I'm not sure what that is being used for.

fwiw, I tested on MacOS and it works.

@joshka
Copy link
Member

joshka commented Apr 6, 2025

Looks like linux:

npm error gyp info using node@23.11.0 | linux | x64
...
npm error gyp ERR! System Linux 5.15.0-134-generic

@joshka

This comment has been minimized.

@joshka
Copy link
Member

joshka commented Apr 6, 2025

We use mise to note the node version in the mise.toml file. Please try running using the lts version of node (currently v22.14.0)

Using the node:lts image I get a different error. This may suggest it's that the problem is a node 23 thing.

Edit: using --platform linux/amd64 to select the right version of the node:lts image I can successfully build (though npm run dev doesn't run the playwright stuff due to missing deps)

@orhun
Copy link
Member

orhun commented Apr 6, 2025

I'm able to build fine with node v22.13.0 on Arch Linux btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants