Public folder doens't work with ROOT_URL

Hi everyone,
I’m developing my own application Meteor + React.
I noticed that if I run the application using

meteor run

my public folder folder is correct i can access all files:

but if I run using a different root url with path like

ROOT_URL=http://127.0.0.1/weltiq/1 meteor run --port=4000

I received all 404 error from accessing public folder files

file.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Does anyone already experienced this? How could I fix it?

Thanks,
Fabio

file.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Where exactly do you see this error message? Is it in a javascript error that you catch, or will it be printed to your console by the Meteor runtime? How exactly are you trying to access those files?

Ciao Peter thanks for your answer!

I mean in browser console,here with

meteor run

and then

ROOT_URL=http://127.0.0.1/weltiq/1 meteor run --port=4000

It looks like public folder is no more accessible if I use root url with path.

Thanks,
Fabio

Based on the network trace it seems that you’re requesting each of those files with an extra url parameter: v=VERSION

Is it intentional? Can you omit that parameter?

Can you paste the code that actually makes the request to those files? I guess this must be some kind of a script tag in your html code.

Yes the same scripst works perfectly if I run without ROOT_URL parameter

Here you can find the script tags in main.html and the folder structure where you see the public folder

Then it indeed seems like a bug. My app is running on Meteor 1.9.2. With that revision I can access all files in the public folder even with a ROOT_URL with a folder parameter. I’ve also tried exactly your uri, /weltiq/1, and it worked. I don’t know why it fails in your app.

Your server should be accessible on http://127.0.0.1:4000

Same exoerience also with 127.0.0.1 @rjdavid