#Failed to compile. Module parse failed: Unexpected token (312:15) node_modules/highlight.js/lib..

1 messages · Page 1 of 1 (latest)

pale shell
#

I'm trying to setup a test with a new yarn dev of backstage.

I am getting this error in UI:

Failed to compile.

Module parse failed: Unexpected token (312:15)
node_modules/highlight.js/lib/languages/arduino.js
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| variants: [
| {
begin: /=/,
| end: /;/
| },

In CLI i'm seeing:

[1] 2023-10-26T21:26:43.351Z search info Collating documents for software-catalog succeeded type=plugin documentType=software-catalog
[0] <i> [webpack-dev-middleware] wait until bundle finished: /catalog
[0] ERROR in ../../node_modules/highlight.js/lib/languages/arduino.js 312:15
[0] Module parse failed: Unexpected token (312:15)
[0] You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
[0] | variants: [
[0] | {
[0] > begin: /=/,
[0] | end: /;/
[0] | },
[0]
[0] ERROR in ../../node_modules/highlight.js/lib/languages/c-like.js 312:15
[0] Module parse failed: Unexpected token (312:15)
[0] You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
[0] | variants: [
[0] | {
[0] > begin: /=/,
[0] | end: /;/
[0] | },
[0]
...

Not sure what I did wrong? I checked my env:

yarn run v1.22.19
$ /home/backstage-dev/node_modules/.bin/backstage-cli info
OS: Linux 5.15.0-87-generic - linux/x64 (Ubuntu image)
node: v18.18.2
yarn: 1.22.19
cli: 0.23.1 (installed)
backstage: 1.19.0

I also bumped version to 1.19.5 and same error 😦

brisk cobalt
#

I have the same problem 😦

pale shell
#

I'm wondering if this is specific to the highlight.js plugin, maybe a dep issue there