Static folder path depth limit ?
# help
f
I'm continuing to run into all kinds of issues with the static folder resource. I frequently can't re-deploy unless I change the name of the folder (locally and in the annotation). Now, I've gotten the deployment to work, and the static folder is serving some files, but then it fails for others. For example, this 404s: https://podly-pro.shuttleapp.rs/snippets/frontend-aebe9231459ec4d1/node_modules/@auth0/auth0-spa-js/dist/auth0-spa-js.production.esm.js Whereas this works: https://podly-pro.shuttleapp.rs/tailwind.css They both work locally.
I know in a proper deployment I'd just host the files somewhere else, but this is making it very difficult to quickly ship demos
a
heya, do you know exactly what error you get when trying to deploy?
f
Copy code
2023-05-01T14:28:38.761788096Z  INFO Entering loading state
2023-05-01T14:28:38.766554499Z TRACE shuttle_deployer::runtime_manager: making new client
2023-05-01T14:28:38.771563037Z DEBUG shuttle_deployer::runtime_manager: Starting alpha runtime at: /opt/shuttle/shuttle-executables/f7c5253b-e07b-4428-95f9-e7cba11a1a24
2023-05-01T14:28:40.774796254Z  INFO shuttle_proto::runtime: connecting runtime client
2023-05-01T14:28:40.774876760Z DEBUG hyper::client::connect::http: connecting to 127.0.0.1:19738
2023-05-01T14:28:40.777756664Z DEBUG hyper::client::connect::http: connected to 127.0.0.1:19738
2023-05-01T14:28:40.780289600Z DEBUG {service.ready=true} tower::buffer::worker: processing request
2023-05-01T14:28:40.783043447Z  INFO shuttle_deployer::deployment::run: loading project from: /opt/shuttle/shuttle-executables/f7c5253b-e07b-4428-95f9-e7cba11a1a24
2023-05-01T14:28:40.785121236Z DEBUG shuttle_deployer::deployment::run: loading service
2023-05-01T14:28:40.786940557Z DEBUG {service.ready=true} tower::buffer::worker: processing request
2023-05-01T14:28:40.798253217Z  INFO {response="LoadResponse { success: false, message: \"Custom error: failed to provision shuttle_static_folder :: StaticFolder\", resources: [] }"} shuttle_deployer::deployment::run: loading response
2023-05-01T14:28:40.798276534Z ERROR {error="Custom error: failed to provision shuttle_static_folder :: StaticFolder"} shuttle_deployer::deployment::run: failed to load service
That was when it was named static, when I change it to static2 it works
I had to do the same thing previously going from dist -> static
a
oh dear ok that's not ideal
I'll query this with engi, thanks a lot for reporting the issue
f
The paths for the static files are in .gitignore, which might be relevant
a
Oh! Yeah this has been an issue historically
f
I realized it worked then I probably added it after
a
I'll try to find the solution for you since I know this issue has been reported at least a few times but can't remember exactly what the solution is
f
Ok, thanks. The bigger one is that is just seems to not be uploading or serving some files even when it works
I guess that could also be a .gitignore issue since the files that don't work are inside of a node_modules path
a
Ok, so if you try creating a .ignore file in the root of your project folder and then writng
!<folder-name>/
inside it, then just saving it and trying to deploy it should work (if you remove it from your .gitignore)
f
Ok, I'll give that a try
So, you're saying I have to add it to .ignore AND remove it from .gitignore?
a
Yeah
The .ignore file will override the .gitignore file but it'll allow it to work for shuttle
oh sorry ignore me I forgot to read. You still want the folder in .gitignore
2 Views