reduxcache* folders are not deleted starting at gatsby 2.19.22 in Docker containers
See original GitHub issueDescription
I have a Docker setup for Gatsby with the following configuration:
# docker-compose.yml
version: '3'
services:
web:
tty: true
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
- "9929:9929"
- "9230:9230"
volumes:
- /app/.cache
- /app/node_modules
- /app/public
- .:/app
environment:
- NODE_ENV=development
- GATSBY_WEBPACK_PUBLICPATH=/
- CHOKIDAR_USEPOLLING=1
# Dockerfile
FROM node:12
EXPOSE 8000 9929 9230
RUN npm i -g gatsby-cli
RUN gatsby telemetry --disable
WORKDIR /app
COPY ./package.json .
RUN npm i
# Run with `gatsby develop -H 0.0.0.0`
# .dockerignore
./.cache
./node_modules
./public
When I run gatsby develop
, I get the following error:
warn Error persisting state: ENOENT: no such file or directory, rename 'reduxcacheF9pfSE' -> '/app/.cache/redux'
warn Error persisting state: ENOENT: no such file or directory, rename 'reduxcache7D8wgJ' -> '/app/.cache/redux'
warn Error persisting state: ENOENT: no such file or directory, rename 'reduxcacheCPgs5R' -> '/app/.cache/redux'
This happens with version 2.19.22, and not with version 2.19.21. I was getting another error earlier, saying something along the lines of cannot move files between incompatible systems. My Docker is on Windows, using Linux VM. I believe the error comes from trying to use system calls for moving files instead of npm package, but I might be wrong, since I don’t know JS well enough to debug this.
Steps to reproduce
Described above
Expected result
Described above
Actual result
Described above
Environment
Run gatsby info --clipboard
in your project directory and paste the output here.
System:
OS: Linux 4.19 Debian GNU/Linux 9 (stretch) 9 (stretch)
CPU: (4) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Shell: 4.4.12 - /bin/bash
Binaries:
Node: 12.13.1 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.12.1 - /usr/local/bin/npm
Languages:
Python: 2.7.13 - /usr/bin/python
npmPackages:
gatsby: 2.19.22 => 2.19.22
gatsby-image: ^2.3.1 => 2.3.1
gatsby-plugin-google-analytics: ^2.2.1 => 2.2.1
gatsby-plugin-manifest: ^2.3.2 => 2.3.2
gatsby-plugin-material-ui: ^2.1.6 => 2.1.6
gatsby-plugin-offline: ^3.1.1 => 3.1.1
gatsby-plugin-react-helmet: ^3.2.1 => 3.2.1
gatsby-plugin-sass: ^2.2.1 => 2.2.1
gatsby-plugin-sharp: ^2.5.3 => 2.5.3
gatsby-plugin-typescript: ^2.3.1 => 2.3.1
gatsby-source-filesystem: ^2.2.2 => 2.2.2
gatsby-transformer-sharp: ^2.4.2 => 2.4.2
npmGlobalPackages:
gatsby-cli: 2.11.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Troubleshooting Common Errors - Gatsby
This will delete the .cache folder, as well as the public folder for you. Running gatsby develop will recreate the cache and process...
Read more >gatsby | Yarn - Package Manager
Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps. It combines the...
Read more >gatsby/CHANGELOG.md - UNPKG
28, - **gatsby:** remove concurrent-features flag and depend on export ... 1955, - **gatsby:** Use tmp dir for tmp redux cache folder ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Tried with gatsby 2.20.24, it works now! Thanks for the fix!
Because of #22959 I discovered #22999 today, which essentially is the same as this issue, but without docker involved.
There is https://github.com/gatsbyjs/gatsby/pull/23005 which may also fix this issue.