creativetimofficial / ct-paper-dashboard-pro-react

17 stars 6 forks source link

[Bug] When using Axios, the URL gets paper-dashboard-pro-react appended to it #26

Closed gravitymedianet closed 1 year ago

gravitymedianet commented 1 year ago

Version

1.3.1

Reproduction link

http://envisionedsoftware.com/there-is-no-url

Operating System

Windows

Device

Desktop

Browser & Version

Chrome Latest

Steps to reproduce

I added axios to my app.

I set the baseURL to http://localhost:3000 and added a proxy file setupProxy.js in the root to reroute to localhost:5000.

When I then do axios.get('/api/[my url]'), I see in the console that the URL is changed to: localhost:3000/paper-dashboard-pro-react/api/[my url]

I searched through all the code and cannot find anywhere where this paper-dashboard-pro-react is coming from. I don't understand why it is being added to each API request. How do I remove this?

What is expected?

Should not add "paper-dashboard-pro-react" to the URL

What is actually happening?

it is being appended


Solution

Additional comments

gravitymedianet commented 1 year ago

I found the issue; the documentation says to remove the homepage attribute from package.json, this resolved it.