-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Webpack creating json.gzip files in app root when using docker #483
Comments
We already have cc @hzoo |
Sorry, I actually haven't used that option before, code is here
|
This is due to how npm works when run as root user I suggest using this package to avoid this problem https://github.com/avajs/find-cache-dir |
What are the relevant packages we need to send PRs to? @thangngoc89 Would you be interested in doing so? |
We need to setup it up in babel-loader setting.
From now on, babel-loader will use If you accept this solution, I would be happy to send out a PR |
Sounds good if you can make it work. Ideally I’d avoid using |
Hey. What about this issue? |
@zelenin Sorry, I forgot this. This will be my first thing to do tomorrow. For now, don't run this in docker with root user. |
Why didn’t we send a PR to |
Set the default cache directory as the [common cache directory](https://github.com/avajs/find-cache-dir), `./node_modules/.cache/babel-loader`. Previously, when `cacheDirectory` was set to `true`, babel-loader tried to use the operating system's temporary directory as a cache directory. However, when running npm scripts as the root user, [npm overrides the TMPDIR environment variable](npm/npm#4531). This caused the cache files to be created in the project folder itself, for example when using Docker: facebook/create-react-app#483.
Set the default cache directory as the [common cache directory](https://github.com/avajs/find-cache-dir), `./node_modules/.cache/babel-loader`. Previously, when `cacheDirectory` was set to `true`, babel-loader tried to use the operating system's temporary directory as a cache directory. However, when running npm scripts as the root user, [npm overrides the TMPDIR environment variable](npm/npm#4531). This caused the cache files to be created in the project folder itself, for example when using Docker: facebook/create-react-app#483.
Set the default cache directory as the [common cache directory](https://github.com/avajs/find-cache-dir), `./node_modules/.cache/babel-loader`. Previously, when `cacheDirectory` was set to `true`, babel-loader tried to use the operating system's temporary directory as a cache directory. However, when running npm scripts as the root user, [npm overrides the TMPDIR environment variable](npm/npm#4531). This caused the cache files to be created in the project folder itself, for example when using Docker: facebook/create-react-app#483.
Set the default cache directory as the [common cache directory](https://github.com/avajs/find-cache-dir), `./node_modules/.cache/babel-loader`. Previously, when `cacheDirectory` was set to `true`, babel-loader tried to use the operating system's temporary directory as a cache directory. However, when running npm scripts as the root user, [npm overrides the TMPDIR environment variable](npm/npm#4531). This caused the cache files to be created in the project folder itself, for example when using Docker: facebook/create-react-app#483.
I've sent a PR to |
This should be fixed in 0.4.2. |
Set the default cache directory as the [common cache directory](https://github.com/avajs/find-cache-dir), `./node_modules/.cache/babel-loader`. Previously, when `cacheDirectory` was set to `true`, babel-loader tried to use the operating system's temporary directory as a cache directory. However, when running npm scripts as the root user, [npm overrides the TMPDIR environment variable](npm/npm#4531). This caused the cache files to be created in the project folder itself, for example when using Docker: facebook/create-react-app#483.
Set the default cache directory as the [common cache directory](https://github.com/avajs/find-cache-dir), `./node_modules/.cache/babel-loader`. Previously, when `cacheDirectory` was set to `true`, babel-loader tried to use the operating system's temporary directory as a cache directory. However, when running npm scripts as the root user, [npm overrides the TMPDIR environment variable](npm/npm#4531). This caused the cache files to be created in the project folder itself, for example when using Docker: facebook/create-react-app#483.
webpack/webpack#2223 (comment)
Should we use
cacheDirectory
to fix it?The text was updated successfully, but these errors were encountered: