-1

Token: {app-url}/reset-password/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTI3OTUxNjksInVzZXJJZCI6NjB9.YS1seObMs45hcTDH4nSbTNh1W4fTTqPcpF4TUamfFFk

Error: Error: Not Found The requested URL /reset-password/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTI3OTUxNjksInVzZXJJZCI6NjB9.YS1seObMs45hcTDH4nSbTNh1W4fTTqPcpF4TUamfFFk was not found on this server.

Code:

<Route exact path="/reset-password/:token" component={ResetPassword} />

enter image description here

Does this issue bcs app deployed in GCloud or any thing needs to change in react code (project is create react app not webpack) ?

app.yaml

runtime: nodejs12
handlers:
- url: /(.*\..+)$
  static_files: build/\1
  upload: build/(.*\..+)$
- url: /.*
  static_files: build/index.html
  upload: build/index.html
Avani Bataviya
  • 361
  • 1
  • 9

1 Answers1

2

Needs to change app.yaml

runtime: nodejs12
handlers:
  - url: /static
    static_dir: build/static
  - url: /(.*\.(json|ico|js|png))$
    static_files: build/\1
    upload: build/.*\.(json|ico|js|png)$
  - url: .*
    static_files: build/index.html
    upload: build/index.html

thanks to https://stackoverflow.com/a/55831186

Avani Bataviya
  • 361
  • 1
  • 9