Delete Strapi build and .cache folders
Hello, how can I get a list of files in my railway project?
I tried the command
railway run ls
but it doens't recognize ls
.
I would like to check if there's a build
and .cache
folder so i can delete them and then rebuild.
Please let me know if there's another way to achieve this, thanks!25 Replies
Project ID:
b5e8cf1d-aabc-407e-b35e-00c7b95d79c2
b5e8cf1d-aabc-407e-b35e-00c7b95d79c2
railway run
runs the given command locally, there is no native way to run commands on the deployment.
if you want to check the files then check what files you have in your GitHub repo.
but please also describe the issue you are facingah that makes sense
my issue is that im getting this error
ReferenceError: CUSTOM_VARIABLES is not defined
which is a common issue when trying to use .env in a local plugin in Strapi:
https://forum.strapi.io/t/use-env-in-local-plugin/992/7
Strapi Community Forum
Use .env in local plugin
Unfortunately not, I would imagine you don’t want that API leaked in the build and it would be better in your case I think to construct an API controller in the plugin backend to handle the request and forward the response to your plugin frontend. If the key environment variable isn’t included during build time (of the admin and the plugin admi...
this apparently should fix it but im not sure how to do it in my situation.. here's my github files lis:
you are experiencing this issue locally right? since .env files do not come into play when on railway
doesn't work locally and on production (same error message)
hmm in that case is there a way to retrieve the env variables on the server?
look at the service variables
they work just fine
i think this might jsut be a strapi issue
no this wouldn't be a strapi nor railway issue, this would be due to some misconfigurations of your project
i might have an idea then
they said i should create a
admin.config.js
in the root of my project folderyep you definitely have some kind of misconfigurations going on
think they meant inside the
src
folder thentake a look at railway's strapi template for the correct folder structure
alright
checking now
lmao
im so blind
so it should be inside the
src
folder
ok will try to deploy the changes now
well now i get an error saying webpack.DefinePlugin is not a constructor
i debugged the webpack object to check if DefinePlugin exists in it
and now i see that everything is inside webpack.default
would it be worth it to just deploy the strapi template and use that? it seems like you may have a few issues going on?
the probject is created from the strapi template x)
but nah all good now
this is the only issue i was facing
i don't get the errors anymore
thanks for the help!
happy to hear that