Closed undt closed 2 years ago
Hi @undt , unfortunately I am unable to reproduce this error. Although from the error message it looks like you may have an extra }
somewhere in your config.json
file. Can you check if the json file has no syntax error?
Using:
{ "readmeUrl": "https://raw.githubusercontent.com/cveinnt/cveinnt/master/README.md", "title": "LiveTerm", "name": "John Doe", "ascii": "liveterm", "social": { "github": "github", "linkedin": "linkedin" }, "email": "contact@email.com", "ps1_hostname": "liveterm", "ps1_username": "visitor", "repo": "https://github.com/Cveinnt/LiveTerm", "resume_url": "https://upload.wikimedia.org/wikipedia/commons/c/cc/Resume.pdf", "donate_urls": { "paypal": "https://paypal.me/cveinnt", "patreon": "https://patreon.com/cveinnt" }, "colors": { "light": { "background": "#FBF1C9", "foreground": "#3C3836", "yellow": "#D79921", "green": "#98971A", "gray": "#7C6F64", "blue": "#458588", "red": "#CA2124" }, "dark": { "background": "#2E3440", "foreground": "#E5E9F0", "yellow": "#5E81AC", "green": "#A3BE8C", "gray": "#88C0D0", "blue": "#EBCB8B", "red": "#BF616A" } } }
I still get said error:
./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[2]!./src/styles/global.css
SyntaxError: /home/node/app/config.json: Unexpected token } in JSON at position 160
at parse (
This is the full docker compose error:
liveterm@0.1.0 dev
next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
warn - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
wait - compiling...
error - ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[2]!./src/styles/global.css
SyntaxError: /home/node/app/config.json: Unexpected token } in JSON at position 160
at parse (<anonymous>)
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
wait - compiling /_error (client and server)...
wait - compiling...
error - ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[2]!./src/styles/global.css
SyntaxError: /home/node/app/config.json: Unexpected token } in JSON at position 160
at parse (<anonymous>)
That's odd, your config.json
looks fine but somehow Next.js is throwing a SyntaxError
.
This might be a very obscure bug with Next.js's compilers. I would recommend that you submit an issue here as well.
Does this error only occur on Docker installs? Can you also include your system information so I can try and reproduce this error?
I receive this error upon launching of the website via a browser, this is on the default docker install as shown in the readme:
Failed to compile
./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[3].oneOf[8].use[2]!./src/styles/global.css SyntaxError: /home/node/app/config.json: Unexpected token } in JSON at position 160 at parse ()
This error occurred during the build process and can only be dismissed by fixing the error.