Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Stuck at start - Error: ENOTEMPTY: directory not empty, rmdir #383

Closed
unlight opened this issue Mar 10, 2017 · 21 comments
Closed

Stuck at start - Error: ENOTEMPTY: directory not empty, rmdir #383

unlight opened this issue Mar 10, 2017 · 21 comments
Labels

Comments

@unlight
Copy link

unlight commented Mar 10, 2017

Win8.1 x64
-- fuse-box@1.3.126

Error: ENOTEMPTY: directory not empty, rmdir 'D:\My\Dev\angular-fusebox-seed\.fusebox\cache\1.3.126\D%3A%5CMy%5CDev%5Cangular-fusebox-seedD%3A%5CMy%5CDev%5Cangular-fusebox-seed%5Cbuild%5Capp.js'
    at Object.fs.rmdirSync (fs.js:819:18)
    at rmkidsSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:300:11)
    at rmdirSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:289:7)
    at rimrafSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:254:7)
    at D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:298:5
    at Array.forEach (native)
    at rmkidsSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:297:26)
    at rmdirSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:289:7)
    at rimrafSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:254:7)
    at D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:298:5
    at Array.forEach (native)
    at rmkidsSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:297:26)
    at rmdirSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:289:7)
    at rimrafSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:254:7)
    at D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:298:5
    at Array.forEach (native)
    at rmkidsSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:297:26)
    at rmdirSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:289:7)
    at Function.rimrafSync [as sync] (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\rimraf.js:254:7)
    at Object.removeSync (D:\My\Dev\angular-fusebox-seed\node_modules\fs-extra\lib\remove\index.js:4:17)
    at Object.removeFolder (D:\My\Dev\angular-fusebox-seed\node_modules\fuse-box\dist\commonjs\Utils.js:83:13)
    at WorkFlowContext.nukeCache (D:\My\Dev\angular-fusebox-seed\node_modules\fuse-box\dist\commonjs\core\WorkflowContext.js:83:17)
    at FuseBox.compareConfig (D:\My\Dev\angular-fusebox-seed\node_modules\fuse-box\dist\commonjs\core\FuseBox.js:177:34)
    at new FuseBox (D:\My\Dev\angular-fusebox-seed\node_modules\fuse-box\dist\commonjs\core\FuseBox.js:138:14)
    at Function.init (D:\My\Dev\angular-fusebox-seed\node_modules\fuse-box\dist\commonjs\core\FuseBox.js:141:16)
    at realm_utils_1.each (D:\My\Dev\angular-fusebox-seed\node_modules\fuse-box\dist\commonjs\core\FuseBox.js:163:36)
    at iterate (D:\My\Dev\angular-fusebox-seed\node_modules\realm-utils\dist\commonjs\each.js:79:34)
    at D:\My\Dev\angular-fusebox-seed\node_modules\realm-utils\dist\commonjs\each.js:92:16
    at Object.exports.Each [as each] (D:\My\Dev\angular-fusebox-seed\node_modules\realm-utils\dist\commonjs\each.js:9:12)
    at FuseBox.bundle (D:\My\Dev\angular-fusebox-seed\node_modules\fuse-box\dist\commonjs\core\FuseBox.js:161:34)
    at D:\My\Dev\angular-fusebox-seed\gulpfile.ts:100:32
    at taskWrapper (D:\My\Dev\angular-fusebox-seed\node_modules\undertaker\lib\set-task.js:13:15)
    at bound (domain.js:280:14)
    at runBound (domain.js:293:12)
    at asyncRunner (D:\My\Dev\angular-fusebox-seed\node_modules\async-done\index.js:36:18)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

I suppose this is some kind of 'smart' cache is trying to delete cache folder with no luck.
Please provide option to disable it (cache deleting)

Issue is not reproduced when settings is cache: false

@devmondo devmondo added the bug label Mar 11, 2017
@devmondo
Copy link
Member

@unlight thank for the report, we are aware of this and working on it, by the way, are you on a windows machine?

to solve this temporary, restart bundling process, also can you describe when it happens exactly so we can track it better?

@unlight
Copy link
Author

unlight commented Mar 11, 2017

@devmondo what you mean by "restart bundling process"?
This error cause exit from node process, start task and again this error.
Cleaning cache is not helping.

And yes, I'm on Win8 x64

@danielearwicker
Copy link

I also have this. Not on all projects but specifically one where I need to transpile TS to ES6 and then through babel-preset-react-native.

const fuse = FuseBox.init({
    homeDir: "src",
    outFile: "./../../CNL.IPSecurityCenter.Web.Client/wwwroot/mobile-native.js",
    sourcemaps: true,
    plugins: [
        
        BabelPlugin({
            test: /\.jsx?$/, // test is optional
            config: {
                sourceMaps: true,
                presets: ["babel-preset-react-native"]                
            },
            limit2project: false
        }),

        TypeScriptHelpers(),
    ]
});

The fuse runs for a long time and then errors with:

Error: ENOTEMPTY: directory not empty, rmdir 'C:\Source\Trunk\Solutions\CNL.IPSecurityCenter.Portal\src\Mobile\Native\.fusebox\cache\1.3.126\C%3A%5CSource%5CTrunk%5CSolutions%5CCNL.IPSecurityCenter.Portal%5Csrc%5CMobile%5CNativeC%3A%5CSource%5CTrunk%5CSolutions%5CCNL.IPSecurityCenter.Portal%5Csrc%5CCNL.IPSecurityCenter.Web.Client%5Cwwwroot%5Cmobile-native.js'

It would be great if you could minimise paths lengths on Windows - even if it works for you, other products on Windows are useless and are incapable of handling paths longer than about 250 characters! A terrible example is Microsoft's TFS build system which fails to clean up a previous build if it has produced a long directory path.)

@nchanged
Copy link
Contributor

@danielearwicker do you think it's related to the path length? Cuz this happens on windows! ;-(

@unlight
Copy link
Author

unlight commented Mar 12, 2017

I dont, because for me fullpath to deleting dir is about 150 chars

@devmondo
Copy link
Member

@unlight @danielearwicker are you guys by any chance using webstorm as your IDE ?

@devmondo
Copy link
Member

@nchanged we could detect windows env, and instead of using rim rf we spawn a windows native process and simulate same thing!

@danielearwicker
Copy link

@devmondo - not using webstorm. For the project where I get this issue, it's all Windows command line. I have other projects on Windows with very similar length paths that are not having this problem, so I don't think that's necessarily the cause here - just an observation as long paths could cause other problems on Windows (insane in 2017, but it's true).

@devmondo
Copy link
Member

@danielearwicker, thanks, just wanted to confirm cuz I use webstorm.

we really need to get to the bottom of this, again I think we should handle windows natively here and not using rm rf

unlight added a commit to unlight/fuse-box that referenced this issue Mar 13, 2017
@nchanged
Copy link
Contributor

Should be fixed in 1.3.128

@unlight
Copy link
Author

unlight commented Mar 14, 2017

Nope. Still reproduced in fuse-box@1.3.128

@nchanged nchanged reopened this Mar 14, 2017
@nchanged
Copy link
Contributor

nchanged commented Mar 14, 2017

Could you post your config? or a github repo, so we check

@unlight
Copy link
Author

unlight commented Mar 14, 2017

Repo
Config

@unlight
Copy link
Author

unlight commented Mar 14, 2017

Updated links

@nchanged
Copy link
Contributor

Thanks! we will check it! I guess 1.3.128 solves a different issue, which was also a biggie =)

@unlight
Copy link
Author

unlight commented Mar 17, 2017

demolishion commit: 0f0bb5b
Rollbacking to v1.3.123

@aretecode
Copy link
Contributor

@unlight #407

@aretecode
Copy link
Contributor

@nchanged should be closed
@unlight can you verify?

@unlight
Copy link
Author

unlight commented Mar 24, 2017

Keep it open until release a new version, but #407 should fix it.

@nchanged
Copy link
Contributor

Yeah, it's in 1.4.1 already

@devmondo
Copy link
Member

devmondo commented May 9, 2017

this is supposed to be fixed now.

we will close it, but feel free to open it otherwise :)

@devmondo devmondo closed this as completed May 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants