javascript fetch failing when target url is on same server as script file – can this be CORS?

I am trying to write a javascript routine which gets a large chunk of text from one of several different files, depending on user behaviour. So I am using the fetch() routine, copying code snippets from many examples on this site. But I always get the “failed to fetch” error, and I am trying to understand why. In other questions, the commonest answer is a CORS failure. But in my case, all the files live on the same server – the .html and .js files are in a directory called (let’s say) B/simulation, and the text files are in a directory called B/parameters. So my question is – Can it be a CORS failure in this situation?
If the answer to that is NO, any ideas of what it might be – though I realize I’ll probably need to provide some actual code to enable anyone to help with that.