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

Fix npm install on Ubuntu 24.04 #9570

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ contribs/dist: .build/build-dll.timestamp
touch $@

.build/node_modules.timestamp: package.json
npm install --omit=optional --legacy-peer-deps
NODE_GYP_FORCE_PYTHON=/usr/bin/python npm install --omit=optional --legacy-peer-deps
# Installed from peer dependency from ol-layerswitcher and that breaks our types
rm -rf ./node_modules/@types/openlayers
mkdir -p $(dir $@)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ GeoMapFish-specific web services. The `gmf` contrib examples are also available
- [make](https://www.gnu.org/software/make/) – GNU Make.
- [node](https://www.nodejs.org/) – nodejs JS runtime environment.
- [npm](https://www.npmjs.com/) – npm package manager.
- [python](https://www.python.org/) – 3.x installed on the system (be careful with pyenv)

On my Ubuntu 24.04, I had to set the following environment variables to make it work:

- `NODE_GYP_FORCE_PYTHON=/usr/bin/python`
- `PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/:/usr/share/pkgconfig/`

### Go further

Expand Down
Loading