-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Docker error SyntaxError: Unexpected token ; (and my suggested fix) #629
Comments
Step1: Could you remove the package-lock.json file and then try? The problem is you have the latest node version and that package-lock.json file is built using the older node version.
|
Here is the pull request you can use for reference:- |
I'll give that a try and I'll let you know it it works. |
Got both docker build and image build working by changing line 14 in "Dockerfile" to Dunno why this is the only thing working for me, migth be due to something else I've installed? Thanks for your help though! |
sorry for the delay, in the attached pull request, I have updated the docker file, kindly use that docker file and nginx.conf file for your work, but its fine, if things work for you. |
Describe the bug
I wanted to use your template to create my own portofolio.
Upon trying to run the docker image, I kept getting a "docker error SyntaxError: Unexpected token ;" which I tried fixing by reviewing error message, checking for syntax issues and dependencies version compatability issues, updating npm and other dependencies, uninstalling and reinstalling npm, troubleshooting the docker image build, and reinstalling node.js and npm.
I'm not sure if the issue at hand was caused by something else on my computer, or if it has to do wish some dependency update that's causing this even though all dependencies seem compatible.
Steps to reproduce
In my case:
Again, unsure if this was due to something else going on on my computer, or if this was due to compatability issues.
Expected behavior
Is this responsiveness Issue
NO
Screenshots
No response
Desktop
Smartphones
Additional context
After trying a bunch of different things, I managed to get the image running by modifying lines 4 and 14 of the "Dockerfile" (in the root of the repository).
Modified line 4:
FROM node:14-alpine
Modified line 14:
RUN apk update && apk add --no-cache git
I'm unsure if this will only work for me or if this could be suggested as a possible fix. Thought I'd share this just in case.
The text was updated successfully, but these errors were encountered: