-
Notifications
You must be signed in to change notification settings - Fork 127
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
Incorrect mapbox-gl peer dependency range (npm7 workspaces) #268
Comments
After review of my suggested change, I believe the range should be this |
I have the same issue, let me know if there is a "hacky" solution for the time being |
This wasn't a problem for us until our CI/CD pipeline upgraded to Node 16.15.1 & npm 8.11.0 now we see this error during npm install:
|
Example on mapbox website shows mapbox-gl 2.8.2 working together with mapbox-gl-directions 4.1.0 A work-around solution for when you use NPM version > 7 is to run |
Still having this problem today:
Does install with These places would be good places to bring attention to the issue: |
I spoke too soon. It installs without the above error tree, but doesn't seem to be there when I attempt to import it. import MapboxDirections from "@mapbox/mapbox-gl-directions";
|
Currently, it does install with
|
A recent update to package.json seems to finally address this in the #298 changeset. Seems like we're now just waiting for them to publish a new version to NPM? cc @chriswhong |
@chriswhong Any updates on this issue? |
Any update on this? @rogadev How do you solve this? |
Yep, i also faced with this problem "Cannot find module '@mapbox/mapbox-gl-directions'", any suggestions? |
@chriswhong Could you please tell me if there's a solution, or update upcoming? I would use the navigation package for a school project and the deadline is coming :D |
Hello, I'm curious about updates on this issue as well. Thank you! 🙂 Update: I installed successfully with the
It seems to come from the let fs = require('fs'); // substack/brfs#39
let tmpl = template(fs.readFileSync(__dirname + '/../templates/inputs.html', 'utf8')); Update: This worked for me to get around this issue: #261 (comment) |
This semver range computes to
>=0.41.0 <0.42.0-0 <2.0.0
.This range can only be satisfied with mapbox-gl versions
>= 0.41.0 < 0.42.0
.This becomes a problem when using npm 7.x and workspaces.
Suggested fix is to change the semver range for the mapbox-gl peer dependency to
0.41.0 <2.0.0
, this will allow mapbox-gl any version below 2.0.0 and above or equal to 0.41.0 to meet the peer dependency which I believe was the original intention.The text was updated successfully, but these errors were encountered: