-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting "Sprockets::FileNotFound in Home#dashboard" error suddenly on localhost #4849
Comments
@shubhscoder its the bootstrap file it specifies I haven't figured out how to fix it though. For me I can run my localhost but all my pushes to unstable fail |
Copying @cesswairimu's message from Gitter channel :
|
it worked for me locally (localhost) when I ran yarn install and yarn upgrade but I don't really understand why it would work locally but not with a push to unstable |
I ran the same commands some days back for resolving this issue. We can see |
https://jenkins.laboratoriopublico.org/job/Plots-Unstable/497/console |
That's the issue! |
I cleared cache a bunch of times is there a way to set it so that jenkins stops using cache |
I found this - https://stackoverflow.com/questions/35594987/how-to-force-docker-for-a-clean-build-of-an-image and let's see if it work or not @cesswairimu and @shubhscoder you can resolve this issue locally by running commands as mentioned by sasha -#4849 (comment) . @Souravirus @icarito any hint about this issue? Thanks! |
Thank you so much @gauravano !
|
@sashadev-sky unstable is back to normal. |
I just force pushed the master branch on unstable and it's back to normal. You tried the force push, Sasha? |
Here's the passed build log - https://jenkins.laboratoriopublico.org/job/Plots-Unstable/499/console the link I posted here resulted in this build - https://jenkins.laboratoriopublico.org/job/Plots-Unstable/500/console |
@jywarren @icarito do you know why my build - https://jenkins.laboratoriopublico.org/job/Plots-Unstable/499/console passed but all the builds from https://jenkins.laboratoriopublico.org/job/Plots-Unstable/487/ to https://jenkins.laboratoriopublico.org/job/Plots-Unstable/498 started by @sashadev-sky failed 😕 ? |
@gauravano it just started working for you by using --force? It could just be my computer setup |
@gauravano is bower still required for proper installation at this point? |
@gauravano nevermind mine worked! |
I always force push on We use yarn with plots2, right? |
Did it work? I guess force push was needed because I have changed the bootstrap3-typeahead to typeahead.js for Bootstrap 4. That's why it might not be working. |
yes @Souravirus, it worked out after force-push. Thanks for checking in :) |
@gauravano @Souravirus yes that was a struggle! I just got a new laptop so it could have been computer related for me, but I had been force pushing the whole time so that was not the solution for me. What led to it working was re-installing my Homebrew configurations for Docker and building and a docker container. Are we supposed to be building containers before pushing to unstable? |
@sashadev-sky I don't use Homebrew, so, I don't have any idea about that. |
I don't use homebrew or docker locally too. |
On 18/02/19 11:55, Sasha Boginsky wrote:
What led to it working was re-installing my Homebrew configurations
for Docker and building and a docker container. Are we supposed to be
building containers before pushing to unstable?
Hi,
Glad you could work it out!
Docker is used in our case to make development / staging / production as
similar as possible. There is no requirement for it but it simplifies in
theory to have as similar as possible environment as production.
A couple of caveats:
-
https://github.com/publiclab/plots2/blob/master/containers/docker-compose-production.yml#L41
: We mount the application working directory as a /volume/. This means
that `public/lib` from your working directory *overrides* whatever is in
the container. It looks like this breaks build isolation, and seems to
be causing confusion for development and even in production. The reason
is that at the time the docker-compose was written I didn't know (and
still I'm not too familiar) with what access the application needs to
persistence on the filesystem (container filesystems are throwaway).
I've been meaning to open an issue about the topic, not being sure how
it affects everything else - your input and help is much appreciated!
|
Thanks for responding here and debugging so much! I wonder if this was linked to the yarn.lock and package.json updates I made recently. This has helped us get our JS dependencies much more up to date, but maybe it had an unintended consequence -- if so, apologies! Does running |
Also noting that this could.... maybe... be related: #4853 |
@cesswairimu how are you doing on this? |
@icarito I don't know too deeply about docker setup, I only learned how to build a container recently because I thought I needed it for the unstable branch. The 2nd occasion I used unstable I ended up building it again because of the sprockets errors and using it the 1st time inadvertently had worked for me. Then sprockets error was resolved. Without using the container the issue is coming up for me again. But in my local environment it is gone after doing yarn install and yarn upgrade once. |
What happens if we simply not mount |
Perhaps mount /app/public/system as volume instead of all of /app - i'll try it in a pull request and we can tests it in unstable. Thanks for the info and help debugging! |
@icarito sorry I am trying to follow but I am little confused. This is my understanding please help fix it if you can:
|
This is great to hear, and perhaps we just need to add better docs on running these to resolve this issue? The Docker config discussion sounds important too, but for those just arriving, the |
Hi everyone, |
Hi, thanks Sourav - is there any change required for the master branch, to
resolve this for everyone? Or is it required to run some step on unstable
like `yarn install` or something to make this go away? Thanks!
…On Sun, Mar 3, 2019 at 11:40 PM Sourav Sahoo ***@***.***> wrote:
Hi everyone,
If the unstable build is failing due to this error: Sprockets::FileNotFound:
couldn't find file 'bootstrap-3-typeahead/bootstrap3-typeahead.min.js' with
type 'application/javascript'. Then you can remove this asset from
app/assets/javascript/application.js. This fix is working for now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4849 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ22atj9TNi_csDfpr7RixinV7fZrks5vTKOtgaJpZM4bASqv>
.
|
Hi @jywarren, I think that there is some problem with the yarn.lock which isn't being updated after adding or removing a package. I guess removing the yarn.lock from the .gitignore file might work because I guess the result of the changes in the package.json might not get updated in the yarn.lock. That's why when I deleted the typeahead package from the package.json, everyone's build failed in unstable after that. The same problem happened to me today. The bootstrap that was installed at first was bootstrap 3 and then when I sent a commit later it was then updated to Bootstrap 4. |
@Souravirus I have noticed inconsistencies between them too, but there is a copy of yarn.lock in the remote repo? I think the configuration set up for yarn could be problematic, let me know what you think: .yarnrc has the following:
which is saying we configured yarn so that it does not run any scripts from package.json. But when we run |
and also in |
Hi @sashadev-sky, the ignore-engines is done to tackle this incompatibility error: |
@Souravirus hmm I don't know much about best practice for yarn setup, just pointing out behavior I thought was strange. But since bower is deprecated I definitely think we should remove or change the current postinstall script. Not a huge deal but don't need those extra symlinks. Perhaps a quick change just to make if you're already playing around with yarn in a PR |
@Souravirus also I found the postinstall script to be really useful for debugging if you put a |
Yeah, I think the postinstall script should be removed for now. If you can send a PR for it, then it would be great. |
@Souravirus will do |
@Souravirus opened an FTO for this via #5037 |
Run |
Suddenly I dont know what happened but I am unable to load any page on localhost because I am getting the above error.I have attached a screeshot of the error. Thank you so much!
Update
See below for
yarn install
andyarn update
to resolve thisThe text was updated successfully, but these errors were encountered: