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

v3.3.0 Circular dependency #13151

Open
guoqing22 opened this issue Apr 17, 2024 · 3 comments
Open

v3.3.0 Circular dependency #13151

guoqing22 opened this issue Apr 17, 2024 · 3 comments

Comments

@guoqing22
Copy link

npm run build-prod

console output ↓

mapbox-gl@3.3.0 build-prod
rollup -c --environment BUILD:production

src/index.js, src/source/worker.js → rollup/build/mapboxgl...
(!) @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to true, as the next major version will default this option to true.
[!] Error: Circular dependency: src/style-spec/expression/parsing_context.js -> src/style-spec/expression/compound_expression.js -> src/style-spec/expression/parsing_context.js

@mourner
Copy link
Member

mourner commented Apr 17, 2024

What's your OS? We added some code to ignore circular dependencies in style-spec, but maybe the leading slash breaks things in Windows, not sure... cc @stepankuzmin

if (warning.code === 'CIRCULAR_DEPENDENCY') {
// Ignore circular dependencies in style-spec and throw on all others
if (!warning.ids[0].includes('/src/style-spec')) throw new Error(warning.message);
} else {
console.error(`(!) ${warning.message}`);
}

@guoqing22
Copy link
Author

os:windows 11
nodejs: v20.12.1

@guoqing22
Copy link
Author

Resolved

windows path "/" is "//"

👇👇👇

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants