Skip to content
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

Bug report: Unexpected identifier after build #72

Open
ichhabkeinbock opened this issue Nov 5, 2024 · 0 comments
Open

Bug report: Unexpected identifier after build #72

ichhabkeinbock opened this issue Nov 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ichhabkeinbock
Copy link

ichhabkeinbock commented Nov 5, 2024

Describe the bug
When building the image from the original Dockerfile, I experience the issue from Issue #56 which is closed and has been fixed apparently. Tried the fix that was proposed there, which leads to a successful build, but when running the container, I stumble across another error. Trying to increase the docker node:alpine version to 23.1.0 didn't work for the same reason.

> [email protected] prod
> NODE_ENV=production node index.mjs

file:///CyberChef-server/node_modules/cyberchef/src/node/api.mjs:13
import OperationConfig from "../core/config/OperationConfig.json" assert {type: "json"};
                                                                  ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:103:18)
    at #translate (node:internal/modules/esm/loader:433:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:480:27)

Node.js v23.1.0

To Reproduce

  • clone the repository
  • cd into the repository
  • docker build -t cyberchef-server .
  • docker run -it --rm --name=cyberchef-server -p 3000:3000 cyberchef-server
    => Fails
  • update first line in Dockerfile to FROM node:23.1.0-alpine
  • build and run, same error.

Expected behavior
After a build it should be possible to run the server without issues.

Node version:

  • 18.20.4
  • 23.1.0

Additional context
Image will be tagged for ACR and then deployed using a Container Instance.

@ichhabkeinbock ichhabkeinbock added the bug Something isn't working label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant