Skip to content

[frontend] - SyntaxError: Unexpected reserved word - on docker #80

@giupo

Description

@giupo

on the following system:

  • Linux kali 6.0.0-kali6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.12-1kali1 (2022-12-19) x86_64 GNU/Linux
  • Docker version 23.0.1, build a5ee5b1
  • Docker Compose version v2.16.0

Cloning the repository and typing

docker compose up 

Produces the following output:

[+] Running 3/3
 ⠿ Container stormspotter-stormspotter-neo4j-1     Recreated                                                                                   1.0s
 ⠿ Container stormspotter-stormspotter-backend-1   Recreated                                                                                   1.4s 
 ⠿ Container stormspotter-stormspotter-frontend-1  Recreated                                                                                   1.3s 
Attaching to stormspotter-stormspotter-backend-1, stormspotter-stormspotter-frontend-1, stormspotter-stormspotter-neo4j-1                           
stormspotter-stormspotter-frontend-1  | file:///usr/local/lib/node_modules/@quasar/cli/bin/quasar.js:43
stormspotter-stormspotter-frontend-1  |   const { getProjectRoot } = await import('../lib/get-project-root.js')
stormspotter-stormspotter-frontend-1  |                              ^^^^^
stormspotter-stormspotter-frontend-1  | 
stormspotter-stormspotter-frontend-1  | SyntaxError: Unexpected reserved word
stormspotter-stormspotter-frontend-1  |     at Loader.moduleStrategy (internal/modules/esm/translators.js:140:18)
stormspotter-stormspotter-frontend-1  |     at async link (internal/modules/esm/module_job.js:42:21)
stormspotter-stormspotter-backend-1   | INFO:     Started server process [1]
stormspotter-stormspotter-backend-1   | INFO:     Waiting for application startup.
stormspotter-stormspotter-backend-1   | INFO:     Application startup complete.
stormspotter-stormspotter-backend-1   | INFO:     Uvicorn running on http://0.0.0.0:9090 (Press CTRL+C to quit)
stormspotter-stormspotter-frontend-1 exited with code 1

A quick fix would be to pin NodeJS to an higher version than 12 in frontend/dockerfile (I know this is quite "generic", but even pinning to latest fixed the issue)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions