Hildebrandt Tobias
11/18/2024, 2:24 PMStarting process 'command '/root/.gradle/nodejs/node-v16.20.2-linux-x64/bin/node''. Working directory: /opt/atlassian/pipelines/agent/build/build/js/packages/frontend Command: /root/.gradle/nodejs/node-v16.20.2-linux-x64/bin/node /opt/atlassian/pipelines/agent/build/build/js/node_modules/webpack/bin/webpack.js --config /opt/atlassian/pipelines/agent/build/build/js/packages/frontend/webpack.config.js
Successfully started process 'command '/root/.gradle/nodejs/node-v16.20.2-linux-x64/bin/node''
Module parse failed: Unexpected token (26:24)
File was processed with these loaders:
* ../../node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| const foundScript = document.querySelector(`script[src="${src}"]`);
| // Call onLoad if script marked as loaded.
> if (foundScript?.dataset.loaded) {
| onLoad();
| return;
I already tried to edit the webpack.config.js with
config.module.rules[0] = {
test: /\.js$/,
enforce: 'pre',
exclude: '/node_modules/',
use: ['source-map-loader'],
};
But it doesn't help.
I know it's all old stuff, but we'd just need it to work for a few months again.
Does anyone have an idea?Artem Kobzar
11/18/2024, 3:29 PMturansky
11/18/2024, 5:13 PMpackage-lock.json
2. ./gradlew clean
3. Build
4. PROFITArtem Kobzar
11/18/2024, 6:37 PMHildebrandt Tobias
11/18/2024, 6:56 PMturansky
11/19/2024, 4:08 PMBuilding locally is fine.If it's fine after cleanup, then cleanup on CI should fix problem
Hildebrandt Tobias
11/20/2024, 8:57 AM- ./gradlew clean
- ./gradlew -Pversion=${version} --no-daemon --console plain -i frontend:build
Sadly the error persists.Ilya Goncharov [JB]
11/20/2024, 10:20 AMfoo?.bar
)
Don't you use Kotlin Gradle plugin with enabled webpack feature (and which version of Kotlin Gradle plugin do you use?)
Do you use frontend plugin?
Do you consider option with migration to relatively new version of Kotlin?Hildebrandt Tobias
11/20/2024, 12:46 PMconfig.resolve.fallback = {
"os": require.resolve("os-browserify/browser"),
"path": require.resolve("path-browserify")
};
Buuuut now it seems to work. Thank you!Ilya Goncharov [JB]
11/20/2024, 12:47 PMHildebrandt Tobias
11/20/2024, 12:50 PM