ENOTEMPTY Error Running App on Windows 10


#1

I am trying to set up a dev environment on Windows 10 for an app I built on Mac - it’s package based upgraded to 1.4.4.1

I have 1.4.4.1 running on windows 10.

I created an empty meteor app then copied my source to it.

I then ran meteor npm update

I then ran meteor npm rebuild

I have re-installed meteor

I was going through my source making sure the file names of what I am referencing in my package.js files are the same names and case as they are named on disk - this seemed to be helping me with some ENOTEMPTY errors but now no matter what I do I get the following error. Note that the directory it is pointing to is in fact EMPTY.

So I am having a hard time debugging this error. If anyone has any ideas for stuff I can try to get past this on windows 10 that would be freakin’ awsome.

Note my code base is a mixture of modules and the legacy global references - in the process of converting as I touch stuff.

Thanks in advance.

C:\Users\drollins\AppData\Local\.meteor\packages\templating-compiler\1.3.2\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\promise\
node_modules\meteor-promise\promise_server.js:190
      throw error;
      ^

Error: ENOTEMPTY: directory not empty, rmdir 'C:\Code\Meteor\test\.meteor\local\isopacks\.build856533.tiu-brackets\web.browser\client'
    at Error (native)
    at Object.fs.rmdirSync (fs.js:758:18)
    at rmkidsSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\ri
mraf\rimraf.js:332:11)
    at rmdirSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\rim
raf\rimraf.js:322:7)
    at rimrafSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\ri
mraf\rimraf.js:293:9)
    at C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\rimraf\rimraf.
js:330:5
    at Array.forEach (native)
    at rmkidsSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\ri
mraf\rimraf.js:329:26)
    at rmdirSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\rim
raf\rimraf.js:322:7)
    at rimrafSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\ri
mraf\rimraf.js:293:9)
    at C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\rimraf\rimraf.
js:330:5
    at Array.forEach (native)
    at rmkidsSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\ri
mraf\rimraf.js:329:26)
    at rmdirSync (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\rim
raf\rimraf.js:322:7)
    at Function.rimrafSync [as sync] (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\
lib\node_modules\rimraf\rimraf.js:293:9)
    at Object.rm_recursive (C:\tools\fs\files.js:303:12)
    at Builder.abort (C:\tools\isobuild\builder.js:696:11)
    at [object Object].saveToPath (C:\tools\isobuild\isopack.js:1681:15)
    at C:\tools\isobuild\isopack-cache.js:380:23
	   at IsopackCache._ensurePackageLoaded (C:\tools\isobuild\isopack-cache.js:241:20)
    at C:\tools\isobuild\isopack-cache.js:77:14
    at C:\tools\packaging\package-map.js:57:7
    at Function._.each._.forEach (C:\Users\drollins\AppData\Local\.meteor\packages\meteor-tool\1.4.4_1\mt-os.windows.x86_32\dev_bundle\lib\
node_modules\underscore\underscore.js:87:22)
    at [object Object]._.extend.eachPackage (C:\tools\packaging\package-map.js:49:7)
    at IsopackCache.buildLocalPackages (C:\tools\isobuild\isopack-cache.js:76:24)
    at C:\tools\project-context.js:841:25
    at C:\tools\utils\buildmessage.js:359:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:352:34
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:350:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
    at ProjectContext._buildLocalPackages (C:\tools\project-context.js:840:18)
    at C:\tools\project-context.js:283:9
    at C:\tools\utils\buildmessage.js:359:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:352:34
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:350:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
    at ProjectContext._.extend._completeStagesThrough (C:\tools\project-context.js:273:18)
    at C:\tools\project-context.js:265:12
    at Function.run (C:\tools\tool-env\profile.js:490:12)
    at ProjectContext._.extend.prepareProjectForBuild (C:\tools\project-context.js:264:13)
    at C:\tools\runners\run-app.js:563:29
    at C:\tools\utils\buildmessage.js:271:13
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:264:29
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:262:18
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:253:23
    at [object Object]._.extend.withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.capture (C:\tools\utils\buildmessage.js:252:19)
    at bundleApp (C:\tools\runners\run-app.js:562:31)
    at [object Object]._.extend._runOnce (C:\tools\runners\run-app.js:631:35)
    at [object Object]._.extend._fiber (C:\tools\runners\run-app.js:890:28)
    at C:\tools\runners\run-app.js:417:12

#2

have u installed babel-runtime like meteor npm install --save babel-rc


#3

I installed the babelruntime but it did not solve my problem.

I began digging around some more and looked more closely at rimraf.js. The library has a more recent version than the one that is packed with Meteor installer for Windows - it has some windows processing improvements - I swapped that in but the problem still persists.

Then I began looking at what things look like right before the failure and I am finding that there is indeed a temp file in the directory which is no longer there by the time the build stops so it looks like this ENOTEMPTY error was thrown for no reason.

I am now looking earlier in the process in Meteor code to see if there is a better place to tell rimraf to do it’s thing, a time after all temp files are closed.

I am pretty sure this is a sequence of events thing.

Stay tuned more to come.


#4

OK so I figured out my issue.

It was indeed that the file names on disk did not match (case sensitive) the file names referenced in my package.js file.

I think it was working on my Mac because I had not changed any of these files for a while now and the compile only looks at changed files normally.

When I ported to windows of course all files were built “compiled” that first time - and this error cropped up.

So this is not a bad thing per se but the error message completely sucks. I mean - it is a bit obtuse. If it’s important that the file names be matched case sensitively then there should be a check for this in the compile process that calls this out to let the developer they are doing something stupid.

There’s a an open PR #8614 where I will reference this post.


#5

I deleted all content in /Users/myComp/AppData/local/Temp.
and also deleted all folders under myProject/.meteor/local/ that has build-garbage in their name.

and now the issue is solved.

If someone need help with deleting files with long names from the Temp folder here is a good explenation: windows - delete files with long names


#6

General fix for the ENOTEMPTY error under Windows: