Closed robbrad591 closed 10 months ago
If I am reading the error log correctly, it looks like the new scss build process isn't working in docker because docker has a different path during the install step. I don't actively use docker, but would be glad to accept a PR if you can come up with change that you have tested and is working. I suspect, you would need to figure out what the path is during the docker installs, and come up with docker script or changes/additions to the npm scripts to handle the path. It looks like currently it can't find public/css
when it tries to run the following during the docker install: sass --no-source-map --load-path=./ --update ./public/css:./public/css
Looks like we just need to copy the file structure before we run npm install. I've got that fixed, however there's an issue with the prepare step in the package.json not running when installing for production. I'll put up a PR when i've got around that. Seems to be a common thing
Hey @YasharF and @robbrad591
I fixed this in https://github.com/sahat/hackathon-starter/pull/1256
See my comments on the PR
The reason behind the issue with husky is that package.json has a call to it, but since it is a dev dependency. The docker image doesn't include dev dependencies by design to keep its size small. We don't want to bloat the image because of a dev dependency. We also can't use ignore-script to skip prepare scripts because ignore-script will also prevent execution of the postinstall scripts. The postinstall scripts include patch-package and sass builds, both of which are needed.
I am looking for a fix to the issue with husky
The other thing that I noticed is that the error is about the sass build, but the PRs that suppress the error mentioned husky. Hence more investigation of the root cause is needed.
The reason the public/css files ends up being empty is because were are overwriting the starter folder by mounting over it here: https://github.com/sahat/hackathon-starter/blob/c7249e9f240f1036f6866f7452d9e3dc28c39db4/docker-compose.yml#L16
We seem to have an issue building the docker image. M1 Mac with the latest docker (4.22.0 (117440)).
The error is as follows:
` => ERROR [web 5/7] RUN npm install --production 72.9s
Post install steps seem to fail. It's strange because if i take out the npm install step, then shell into the container and run the steps manually, it all works.