Open agrawalrahul0305 opened 6 years ago
Same error, someone? with osx mojave Ok, buddy just execute: rm -rf _your_app_folderpath/node_modules/.cache/hard-source/.DS_Store/stamp in my case: rm -rf /Users/MyUser/Escritorio/Blockchain2/embarkEx/TokenFactory/node_modules/.cache/hard-source/.DS_Store
Same error, someone? with osx mojave Ok, buddy just execute: rm -rf _your_app_folderpath/node_modules/.cache/hard-source/.DS_Store/stamp in my case: rm -rf /Users/MyUser/Escritorio/Blockchain2/embarkEx/TokenFactory/node_modules/.cache/hard-source/.DS_Store
That will help only the first time. If webpack is watching the error will be raised again.
This solution will fix the problem:
Delete this file:
rm /Users/MyUser/Escritorio/Blockchain2/embarkEx/TokenFactory/node_modules/.cache/hard-source/.DS_Store
Ignore .DS_Store files in webpack.config
plugins = []
plugins.push(new HardSourceWebpackPlugin.ExcludeModulePlugin([
{
test: /.*\.DS_Store/
}
]))
module.exports =
plugins: plugins
Restart webpack
./node_modules/webpack/bin/webpack.js --watch --progress --colors
@v-pukman The proposed solution with ExcludeModulePlugin
doesn’t work for me, for some reason…
The file node_modules/.cache/hard-source/.DS_Store
still appears, and the webpack watch gets stuck indefinitely.
This is the code:
plugins: [
new HardSourceWebpackPlugin(),
new HardSourceWebpackPlugin.ExcludeModulePlugin([
{
test: /.*\.DS_Store/
}
]),
new webpack.HotModuleReplacementPlugin(),
...
],
And this is the error:
ENOTDIR: not a directory, stat 'node_modules/.cache/hard-source/.DS_Store/stamp'
Any ideas?
@waterlink did you remove .DS_Store or whole hard-source folder from .cache?
I'm getting the same (similar) ENOTDIR error when setting a custom cacheDirectory
on MacOS (Catalina).
Webpack Error. Error: ENOTDIR: not a directory, stat '/Users/thorsent/src/finsemble-mono/packages/seed/.webpack-file-cache/0487cb8e5ee23597045e440f0c5c6503.json.gz/stamp'
Overall relatively vanilla webpack configuration. Here is the plugin configuraton:
new HardSourceWebpackPlugin({
info: {
level: "warn",
},
cacheDirectory: "../.webpack-file-cache/[confighash]",
})
I've tried on both node 12.x and node 14.x. Both exhibit the same error.
I've tried adding the ExcludeModulePlugin but no luck:
new HardSourceWebpackPlugin.ExcludeModulePlugin([
{
test: /.*\.webpack-file-cache/
}
])
delete the file folader 'node_modules/.cache/hard-source' and restart. It help for me.
when I do 'open node_modules' and click into '.cache/hard-source', it works fine. But when I click into '.cache/hard-source/[hash]', the recompile emits the below error:
ℹ 「wdm」: Compiled with warnings.
ℹ 「wdm」: Compiling...
✖ 「wdm」: Error: ENOTDIR: not a directory, stat '/Users/leo/Documents/gitData/github/front-theory/apps/link/node_modules/.cache/hard-source/.DS_Store/stamp'
Expected Behavior
Further builds must read from the existing cache
Is an error being thrown?
[ERROR] (node:13902) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOTDIR: not a directory, stat 'node_modules/.cache/hard-source/.DS_Store/stamp' [ERROR] (node:13902) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Steps to Reproduce
Operating System, Node, and NPM dependency versions