Skip to content

SyntaxError: Unexpected token '?'Β #577

@bykiandra

Description

@bykiandra

Bug Report

Current Behavior
I get the following error when I run npm run postbuild:

> react-snap

πŸ”₯  pageerror at /: SyntaxError: Unexpected token '?'

βœ…  crawled 1 out of 1 (/)

I am trying to deploy the website on Netlify (it's currently live, building from an earlier commit here: https://bykiandra.netlify.app). However, Netlify can't build from any commit where the postbuild script exists.

I've tried looking for the error, but there's nothing amiss in my index.html file, and there are no errors in the console when I build and run my website locally.

Reproducible demo
Repo: https://github.com/bykiandra/home-bykiandra

Expected behavior/code
I'm expecting the script to run with no errors, and for Netlify to be able to build and host the website without any issue.

Possible Solution
I've gone through the other issues and tried some suggestions here and there, but nothing's worked so far. I'll continue fiddling and see if I can find a solution myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions