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

Add .node-version file basic support #1235

Merged

Conversation

MatteoGauthier
Copy link
Contributor

@MatteoGauthier MatteoGauthier commented Dec 3, 2024

Noticed that the .node-version convention is not currently supported.

Note

This is my first Rust PR, if you have suggestion, tips or remarks 😉

  • Tests are added/updated if needed

@MatteoGauthier
Copy link
Contributor Author

Just a small question, when I run :

cargo run -- build examples/node-node-version --name node-node-version

I got this error... It's not breaking the tests but its weird, do you have any idea ?

Details

20.52 unpacking source archive /nix/store/6rn31a96dly28rhgli9nninq7dsaky9c-node-v14.21.3.tar.xz
22.29 source root is node-v14.21.3
22.39 setting SOURCE_DATE_EPOCH to timestamp 1676561550 of file node-v14.21.3/vcbuild.bat
22.40 patching sources
22.40 updateAutotoolsGnuConfigScriptsPhase
22.42 Updating Autotools / GNU config script to a newer upstream version: ./deps/cares/config.sub
22.44 Updating Autotools / GNU config script to a newer upstream version: ./deps/cares/config.guess
22.44 configuring
22.46 fixing libtool script ./deps/cares/ltmain.sh
22.47 ./deps/cares/configure
22.50 configure flags: --prefix=/nix/store/m65ddhqa3i1c4fvykqfk8vkwsk32crkf-nodejs-14.21.3 --shared-libuv --shared-libuv-libpath=/nix/store/kfdvif4lanw5zfdbhnp7hrjlrsxbzal9-libuv-1.46.0/lib --shared-openssl --shared-openssl-libpath=/nix/store/fyic70v28145nnr4s3ff03svr5w6gync-openssl-1.1.1w/lib --shared-zlib --shared-zlib-libpath=/nix/store/i6w8i3ps7x9cyyyvfif55rf1plvprp2f-zlib-1.3/lib --with-intl=system-icu --without-dtrace
22.52 Node.js configure: Found Python 3.11.5...
22.52 Please use python3.10 or python3.9 or python3.8 or python3.7 or python3.6 or python3.5 or python2.7.
23.05 error: builder for '/nix/store/fs2bjgbwk2ivs0h9cljih0j9n25nxhxf-nodejs-14.21.3.drv' failed with exit code 1
24.42 error: 1 dependencies of derivation '/nix/store/8b4ixp1kx3v239p0k1m6rh46p99qjf0l-bf744fe90419885eefced41b3e5ae442d732712d-env.drv' failed to build
------

 1 warning found (use docker --debug to expand):
 - UndefinedVar: Usage of undefined variable '$NIXPACKS_PATH' (line 18)
Dockerfile:8
--------------------
   6 |
   7 |     COPY .nixpacks/nixpkgs-bf744fe90419885eefced41b3e5ae442d732712d.nix .nixpacks/nixpkgs-bf744fe90419885eefced41b3e5ae442d732712d.nix
   8 | >>> RUN nix-env -if .nixpacks/nixpkgs-bf744fe90419885eefced41b3e5ae442d732712d.nix && nix-collect-garbage -d
   9 |
  10 |
--------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-bf744fe90419885eefced41b3e5ae442d732712d.nix && nix-collect-garbage -d" did not complete successfully: exit code: 100
Error: Docker build failed

@iloveitaly
Copy link
Contributor

Check out some of the commands in the makefile to get better errors, the default errors from running rust tests are not great

https://github.com/railwayapp/nixpacks/blob/main/Makefile

@coffee-cup coffee-cup added the release/minor Author minor release label Dec 11, 2024
@coffee-cup
Copy link
Contributor

The error is happening because there are no prebuilt binaries for Node 14 because it is such an old version and it is attempting to build it from source and there are missing dependencies needed. Using a newer version of Node should work.

@MatteoGauthier
Copy link
Contributor Author

Hey @coffee-cup, I've updated the PR

  • The version in the example is now v22 (LTS)
  • Tests updated
  • Example node-node-version is working well

Copy link
Contributor

This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale The pull request is stale label Dec 23, 2024
Copy link
Contributor

This pull request was closed for lack of activity. Feel free to reopen later.

@github-actions github-actions bot closed this Dec 29, 2024
@coffee-cup coffee-cup reopened this Jan 6, 2025
@coffee-cup coffee-cup removed the stale The pull request is stale label Jan 6, 2025
@coffee-cup coffee-cup merged commit bf229df into railwayapp:main Jan 6, 2025
102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/minor Author minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants