-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
SourceMap option does not work on GitLab CI #51
Comments
You have broken source maps, please open an issue in |
Anyway the main problem here:
Try to set this flag ( |
Thanks for the quick response,
(Original log: https://gitlab.com/ofhouse/stackoverflow-65355772/-/jobs/947104530) I agree that the Error message comes from a broken sourcemap but I don't understand who has generated the sourcemap. The |
If you remove the |
No, still got the same message: https://gitlab.com/ofhouse/stackoverflow-65355772/-/jobs/947141852 |
Can you monkey patching your code of plugin for CI here https://github.com/webpack-contrib/css-minimizer-webpack-plugin/blob/master/src/index.js#L266 (just put |
What is you use for tests? Jest? What is environment? jsdom or node? |
The output from L266:
Output from L349:
Original log: https://gitlab.com/ofhouse/stackoverflow-65355772/-/jobs/947196486 I am familiar with jest but for this project I just use webpack cli to trigger the build: https://gitlab.com/ofhouse/stackoverflow-65355772/-/blob/main/package.json#L8 |
hm, very weird, can you try to run |
Oh yes, of course.
Logged it also from
Original log: https://gitlab.com/ofhouse/stackoverflow-65355772/-/jobs/947320884 So it seems like you're right and the failure comes from the |
Okay, let's do monkey patching this line /builds/ofhouse/stackoverflow-65355772/node_modules/source-map/lib/util.js:24:11, because I don't have ideas what is wrong, feeling that something wrong with Node.js on Github CI |
Yeah, tested it manually and it returned |
Using this code console.log('aSourceMap (toString)', aSourceMap)
console.log('aSourceMap: ', JSON.stringify(aSourceMap, null, 2));
console.log('RAW Version', aSourceMap['version'])
console.log('Object.getOwnPropertyDescriptor', Object.getOwnPropertyDescriptor(aSourceMap, 'version')) Gives me the following output:
I don't get it 🙈 Since it is running on an official Node.js docker image ( |
Okay, we found a problem ⭐ now we need to search who create it, can you put
Here https://github.com/webpack-contrib/css-minimizer-webpack-plugin/blob/master/src/index.js#L349 |
And can you try other image for Gitlab CI? Perhaps still something wrong with Node.js |
Yep, got me the same output in L349:
(Log: https://gitlab.com/ofhouse/stackoverflow-65355772/-/jobs/947587834) Will try another image in a second |
No, tested it with |
Can you try to disable - |
Same result with |
Very very very strange, I don't have ideas 😞 |
Try to debug it more, maybe we will found something... |
Ok, no problem. Many thanks for taking the time to help me! 🙂 |
Ok found something: Setting |
I downgraded to v1.1.3 to workaround the issue. Seems to be reproducible since v1.1.4 |
@ofhouse give me time to look at this |
@alexander-akait No problem, take your time. I also updated the |
I think I will release patch version today/tomorrow |
WIP on this |
Upgraded to v1.2.0, webpack builds perfectly here. Thank you! 🙌 |
I will check other minimizers on the same problem (WIP) |
v1.2.0 fixed the issue for me as well! Great work, thank you 👍 |
Expected Behavior
Should produce a sourcemap on GitLab CI in the same way as on my local machine.
Actual Behavior
Fails with the following error message:
Code
Reproduction repository: https://gitlab.com/ofhouse/stackoverflow-65355772
How Do We Reproduce?
npm run build
(success)Example output from the current HEAD of the repository: https://gitlab.com/ofhouse/stackoverflow-65355772/-/jobs/945541367
I've tried out many different setups but I always fail to reproduce the issue locally.
Even running inside the same docker image with
does not let me reproduce the issue.
I have no idea how I could abstract this issue further, so my hope is that somebody here has an idea what's happening 🙏.
Edit:
What it makes it even stranger is that it also runs successfully on GitHub actions: https://github.com/ofhouse/stackoverflow-65355772/runs/1652026529
The text was updated successfully, but these errors were encountered: