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

Document or support building with node 17 #2031

Open
jpeach opened this issue Feb 16, 2022 · 3 comments
Open

Document or support building with node 17 #2031

jpeach opened this issue Feb 16, 2022 · 3 comments
Labels
type: bug Something isn't working

Comments

@jpeach
Copy link

jpeach commented Feb 16, 2022

Description

If you are following the local build instructions, it tells you to install node. However IIUC, the javascript dependencies are explicitly pinned to node 16:

frontend/package.json:    "node": ">=16.0.0 <17",

Homebrew currently defaults to installing node 17, though there is a compatibility node 16 package (that requires you to explicitly install and link a different package).

Expected Behavior

Actual Behavior

node errors out if you follow the instructions:

 % make
tools/compile-protos.sh -c "/Users/jpeach/upstream/clutch/api"
info: compiling go
/Users/jpeach/upstream/clutch/api/api/v1
/Users/jpeach/upstream/clutch/api/assets/v1
/Users/jpeach/upstream/clutch/api/audit/v1
/Users/jpeach/upstream/clutch/api/authn/v1
/Users/jpeach/upstream/clutch/api/authz/v1
/Users/jpeach/upstream/clutch/api/aws/dynamodb/v1
/Users/jpeach/upstream/clutch/api/aws/ec2/v1
/Users/jpeach/upstream/clutch/api/aws/kinesis/v1
/Users/jpeach/upstream/clutch/api/bot/slackbot/v1
/Users/jpeach/upstream/clutch/api/chaos/experimentation/v1
/Users/jpeach/upstream/clutch/api/chaos/redisexperimentation/v1
/Users/jpeach/upstream/clutch/api/chaos/serverexperimentation/v1
/Users/jpeach/upstream/clutch/api/config/gateway/v1
/Users/jpeach/upstream/clutch/api/config/middleware/accesslog/v1
/Users/jpeach/upstream/clutch/api/config/module/bot/slackbot/v1
/Users/jpeach/upstream/clutch/api/config/module/chaos/experimentation/xds/v1
/Users/jpeach/upstream/clutch/api/config/module/chaos/redisexperimentation/v1
/Users/jpeach/upstream/clutch/api/config/module/chaos/serverexperimentation/v1
/Users/jpeach/upstream/clutch/api/config/module/featureflag/v1
/Users/jpeach/upstream/clutch/api/config/module/feedback/v1
/Users/jpeach/upstream/clutch/api/config/module/proxy/v1
/Users/jpeach/upstream/clutch/api/config/module/sourcecontrol/v1
/Users/jpeach/upstream/clutch/api/config/service/auditsink/slack/v1
/Users/jpeach/upstream/clutch/api/config/service/audit/v1
/Users/jpeach/upstream/clutch/api/config/service/authn/v1
/Users/jpeach/upstream/clutch/api/config/service/authz/v1
/Users/jpeach/upstream/clutch/api/config/service/aws/v1
/Users/jpeach/upstream/clutch/api/config/service/bot/v1
/Users/jpeach/upstream/clutch/api/config/service/chaos/experimentation/terminator/v1
/Users/jpeach/upstream/clutch/api/config/service/db/postgres/v1
/Users/jpeach/upstream/clutch/api/config/service/envoyadmin/v1
/Users/jpeach/upstream/clutch/api/config/service/github/v1
/Users/jpeach/upstream/clutch/api/config/service/k8s/v1
/Users/jpeach/upstream/clutch/api/config/service/sourcegraph/v1
/Users/jpeach/upstream/clutch/api/config/service/temporal/v1
/Users/jpeach/upstream/clutch/api/config/service/topology/v1
/Users/jpeach/upstream/clutch/api/core/envoy/v1
/Users/jpeach/upstream/clutch/api/core/project/v1
/Users/jpeach/upstream/clutch/api/envoytriage/v1
/Users/jpeach/upstream/clutch/api/featureflag/v1
/Users/jpeach/upstream/clutch/api/feedback/v1
/Users/jpeach/upstream/clutch/api/healthcheck/v1
/Users/jpeach/upstream/clutch/api/k8s/v1
/Users/jpeach/upstream/clutch/api/project/v1
/Users/jpeach/upstream/clutch/api/proxy/v1
/Users/jpeach/upstream/clutch/api/resolver/aws/v1
/Users/jpeach/upstream/clutch/api/resolver/k8s/v1
/Users/jpeach/upstream/clutch/api/resolver/v1
/Users/jpeach/upstream/clutch/api/sourcecontrol/github/v1
/Users/jpeach/upstream/clutch/api/sourcecontrol/v1
/Users/jpeach/upstream/clutch/api/sourcegraph/v1
/Users/jpeach/upstream/clutch/api/timeseries/v1
/Users/jpeach/upstream/clutch/api/topology/v1
/Users/jpeach/upstream/clutch/backend/internal/test/pb/test.proto
info: compiling javascript bundle
OK
./build/bin/yarn.sh --cwd frontend install --frozen-lockfile
yarn install v1.22.11
[1/5] 🔍  Validating package.json...
error @clutch-sh/[email protected]: The engine "node" is incompatible with this module. Expected version ">=16.0.0 <17". Got "17.5.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
make: *** [yarn-install] Error 1

Version
7962bdb

Other Context

Downgrading node seems to make the build work:

% brew remove node
% brew install node@16
% brew link --overwrite node@16
@jpeach jpeach added the type: bug Something isn't working label Feb 16, 2022
@smonero
Copy link
Contributor

smonero commented Feb 16, 2022

One thing I've found to make this convenient is you can use nvm to be able to quickly switch between node versions without having to overwrite / reinstall every time. For example once you have nvm set up you can use nvm use 16 to quickly switch from 17 to 16 inside that shell, then when nvm use 17 or close the window to switch back. I know this isn't a real solution to the problem but just thought I'd point this out since I have found it to be useful.

https://github.com/nvm-sh/nvm/blob/master/README.md

@dschaller
Copy link
Contributor

@jpeach would it be helpful to have a note earlier on in the local build guide around requiring node 16?

@jpeach
Copy link
Author

jpeach commented Feb 16, 2022

@jpeach would it be helpful to have a note earlier on in the local build guide around requiring node 16?

Yeh that would be helpful. I don't know how compatible the versions are - is it reasonable to remove the version check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants