Skip to content

Commit

Permalink
Fix npm install on Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jan 13, 2025
1 parent 28a1fb4 commit 67f7587
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

0 comments on commit 67f7587

Please sign in to comment.