- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension):
- SonarQube 7.9.5
- sonar-scanner 3.1.0
- how is SonarQube deployed:
- running locally (Apple M1 / zsh)
- what are you trying to achieve:
- I would like to resolve this parse error
- what have you tried so far to achieve this:
- I am not very familiar with various versions of Sonar. Since this is a parse error, my assumption is that if I stay on the same version of Sonar (7.9.5), I will be unable to resolve this issue.
I’ve provided the error message below with some data redacted for confidentiality:
ERROR: Unable to parse file: file:///<REDACTED>.mjs.js
ERROR: Parse error at line 1 column 51:
1: import <REDACTED> from "../<REDACTED>.json" assert { type: 'json' };
^
2:
3: export default function getAllowList(allowListKeys) {
4: if (!Array.isArray(allowListKeys)) throw Error(`TypeError: getAllowList - Expected String[] but received ${typeof allowListKeys}`);
5: return allowListKeys.reduce((accumulation, nextKey) => {
6: accumulation[nextKey] = <REDACTED>[nextKey];
7: return accumulation;
8: },{})
9: }
10: export {
11: <REDACTED>