apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
MIT License
4.35k stars 591 forks source link

Windows: ENOTEMPTY on startup #1978

Open ghost opened 5 years ago

ghost commented 5 years ago

please help with fresh installation from apostrophe over windows 10 i keep getting the below error . after tens of running node appjs or nodemon the project start !!!

E:\node-apostrophe\dvld-intermediate\node_modules\mongodb\lib\utils.js:123 process.nextTick(function() { throw err; }); ^

Error: ENOTEMPTY: directory not empty, rmdir 'E:\node-apostrophe\dvld-intermediate\public\modules\apostrophe-images\js' at Object.rmdirSync (fs.js:680:3) at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:356:25) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at rimrafSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:342:5 at Array.forEach () at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:341:26) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at Function.rimrafSync [as sync] (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at Object.self.removeThenRecursiveCopy (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:760:18) at Object.self.linkAssetFolderOnWindows (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:743:19) at Object.self.linkAssetFolder (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:682:14) at E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:646:14 at E:\node-apostrophe\dvld-intermediate\node_modules\@sailshq\lodash\lib\index.js:3253:15 at baseForOwn (E:\node-apostrophe\dvld-intermediate\node_modules\@sailshq\lodash\lib\index.js:2223:14) at E:\node-apostrophe\dvld-intermediate\node_modules\@sailshq\lodash\lib\index.js:3223:18

boutell commented 5 years ago

I have not seen this Windows issue come up before. Unfortunately we do not use Windows in-house, Windows support has mostly been driven by the community. Pull requests are always welcome, otherwise we will try to look into it when we can.

On Mon, Jul 15, 2019 at 9:23 AM alialroomi notifications@github.com wrote:

please help with fresh installation from apostrophe over windows 10 i keep getting the below error . after tens of running node appjs or nodemon the project start !!!

E:\node-apostrophe\dvld-intermediate\node_modules\mongodb\lib\utils.js:123 process.nextTick(function() { throw err; }); ^

Error: ENOTEMPTY: directory not empty, rmdir 'E:\node-apostrophe\dvld-intermediate\public\modules\apostrophe-images\js' at Object.rmdirSync (fs.js:680:3) at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:356:25) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at rimrafSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:342:5 at Array.forEach () at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:341:26) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at Function.rimrafSync [as sync] (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at Object.self.removeThenRecursiveCopy (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:760:18) at Object.self.linkAssetFolderOnWindows (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:743:19) at Object.self.linkAssetFolder (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:682:14) at E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:646:14 at E:\node-apostrophe\dvld-intermediate\node_modules@sailshq \lodash\lib\index.js:3253:15 at baseForOwn (E:\node-apostrophe\dvld-intermediate\node_modules@sailshq \lodash\lib\index.js:2223:14) at E:\node-apostrophe\dvld-intermediate\node_modules@sailshq \lodash\lib\index.js:3223:18

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe/issues/1978?email_source=notifications&email_token=AAAH27KBKEEG66RJ54473JDP7R245A5CNFSM4IDWYHB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7HAYTA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAH27MVAAC745D4DOR62GLP7R245ANCNFSM4IDWYHBQ .

--

Thomas Boutell, Chief Software Architect P'unk Avenue | (215) 755-1330 | punkave.com

ghost commented 5 years ago

I have not seen this Windows issue come up before. Unfortunately we do not use Windows in-house, Windows support has mostly been driven by the community. Pull requests are always welcome, otherwise we will try to look into it when we can. On Mon, Jul 15, 2019 at 9:23 AM alialroomi @.> wrote: please help with fresh installation from apostrophe over windows 10 i keep getting the below error . after tens of running node appjs or nodemon the project start !!! E:\node-apostrophe\dvld-intermediate\node_modules\mongodb\lib\utils.js:123 process.nextTick(function() { throw err; }); ^ Error: ENOTEMPTY: directory not empty, rmdir 'E:\node-apostrophe\dvld-intermediate\public\modules\apostrophe-images\js' at Object.rmdirSync (fs.js:680:3) at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:356:25) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at rimrafSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:342:5 at Array.forEach () at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:341:26) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at Function.rimrafSync [as sync] (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at Object.self.removeThenRecursiveCopy (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:760:18) at Object.self.linkAssetFolderOnWindows (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:743:19) at Object.self.linkAssetFolder (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:682:14) at E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:646:14 at @. \lodash\lib\index.js:3253:15 at baseForOwn @. \lodash\lib\index.js:2223:14) at @. \lodash\lib\index.js:3223:18 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1978?email_source=notifications&email_token=AAAH27KBKEEG66RJ54473JDP7R245A5CNFSM4IDWYHB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7HAYTA>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAH27MVAAC745D4DOR62GLP7R245ANCNFSM4IDWYHBQ . -- Thomas Boutell, Chief Software Architect P'unk Avenue | (215) 755-1330 | punkave.com

aha i see , thanks for your help unfortunately my environment is only windows and i tried to to create many apostrophe projects but the issue still the same !, however thanks again i hope some one will help or i solve this issue

boutell commented 5 years ago

Since you will almost certainly be deploying to Linux in the end, consider using Linux under Virtualbox, or possibly Microsoft's Windows Subsystem for Linux (the real thing in virtualbox is a better choice though).

On Mon, Jul 15, 2019 at 9:35 AM alialroomi notifications@github.com wrote:

I have not seen this Windows issue come up before. Unfortunately we do not use Windows in-house, Windows support has mostly been driven by the community. Pull requests are always welcome, otherwise we will try to look into it when we can. … <#m-1028396164731134676> On Mon, Jul 15, 2019 at 9:23 AM alialroomi @.> wrote: please help with fresh installation from apostrophe over windows 10 i keep getting the below error . after tens of running node appjs or nodemon the project start !!! E:\node-apostrophe\dvld-intermediate\node_modules\mongodb\lib\utils.js:123 process.nextTick(function() { throw err; }); ^ Error: ENOTEMPTY: directory not empty, rmdir 'E:\node-apostrophe\dvld-intermediate\public\modules\apostrophe-images\js' at Object.rmdirSync (fs.js:680:3) at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:356:25) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at rimrafSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:342:5 at Array.forEach () at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:341:26) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at Function.rimrafSync [as sync] (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at Object.self.removeThenRecursiveCopy (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:760:18) at Object.self.linkAssetFolderOnWindows (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:743:19) at Object.self.linkAssetFolder (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:682:14) at E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:646:14 at @. \lodash\lib\index.js:3253:15 at baseForOwn @. \lodash\lib\index.js:2223:14) at @. \lodash\lib\index.js:3223:18 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1978 https://github.com/apostrophecms/apostrophe/issues/1978?email_source=notifications&email_token=AAAH27KBKEEG66RJ54473JDP7R245A5CNFSM4IDWYHB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7HAYTA>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAH27MVAAC745D4DOR62GLP7R245ANCNFSM4IDWYHBQ . -- Thomas Boutell, Chief Software Architect P'unk Avenue | (215) 755-1330 | punkave.com

aha i see , thanks for your help unfortunately my environment is only windows and i tried to to create many apostrophe projects but the issue still the same !, however thanks again i hope some one will help or i solve this issue

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/apostrophe/issues/1978?email_source=notifications&email_token=AAAH27JIO7W6VCHGVVMQBKLP7R4K7A5CNFSM4IDWYHB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ5WUQQ#issuecomment-511404610, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAH27KOQEGIUAEAKC4Y6TDP7R4K7ANCNFSM4IDWYHBQ .

--

Thomas Boutell, Chief Software Architect P'unk Avenue | (215) 755-1330 | punkave.com

ghost commented 5 years ago

Since you will almost certainly be deploying to Linux in the end, consider using Linux under Virtualbox, or possibly Microsoft's Windows Subsystem for Linux (the real thing in virtualbox is a better choice though). On Mon, Jul 15, 2019 at 9:35 AM alialroomi @.> wrote: I have not seen this Windows issue come up before. Unfortunately we do not use Windows in-house, Windows support has mostly been driven by the community. Pull requests are always welcome, otherwise we will try to look into it when we can. … <#m-1028396164731134676> On Mon, Jul 15, 2019 at 9:23 AM alialroomi @.> wrote: please help with fresh installation from apostrophe over windows 10 i keep getting the below error . after tens of running node appjs or nodemon the project start !!! E:\node-apostrophe\dvld-intermediate\node_modules\mongodb\lib\utils.js:123 process.nextTick(function() { throw err; }); ^ Error: ENOTEMPTY: directory not empty, rmdir 'E:\node-apostrophe\dvld-intermediate\public\modules\apostrophe-images\js' at Object.rmdirSync (fs.js:680:3) at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:356:25) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at rimrafSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:342:5 at Array.forEach () at rmkidsSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:341:26) at rmdirSync (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:334:7) at Function.rimrafSync [as sync] (E:\node-apostrophe\dvld-intermediate\node_modules\rimraf\rimraf.js:304:9) at Object.self.removeThenRecursiveCopy (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:760:18) at Object.self.linkAssetFolderOnWindows (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:743:19) at Object.self.linkAssetFolder (E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:682:14) at E:\node-apostrophe\dvld-intermediate\node_modules\apostrophe\lib\modules\apostrophe-assets\index.js:646:14 at @. \lodash\lib\index.js:3253:15 at baseForOwn @. \lodash\lib\index.js:2223:14) at @.** \lodash\lib\index.js:3223:18 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1978 <#1978>?email_source=notifications&email_token=AAAH27KBKEEG66RJ54473JDP7R245A5CNFSM4IDWYHB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7HAYTA>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAH27MVAAC745D4DOR62GLP7R245ANCNFSM4IDWYHBQ . -- Thomas Boutell, Chief Software Architect P'unk Avenue | (215) 755-1330 | punkave.com aha i see , thanks for your help unfortunately my environment is only windows and i tried to to create many apostrophe projects but the issue still the same !, however thanks again i hope some one will help or i solve this issue — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1978?email_source=notifications&email_token=AAAH27JIO7W6VCHGVVMQBKLP7R4K7A5CNFSM4IDWYHB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ5WUQQ#issuecomment-511404610>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAH27KOQEGIUAEAKC4Y6TDP7R4K7ANCNFSM4IDWYHBQ . -- Thomas Boutell, Chief Software Architect* P'unk Avenue | (215) 755-1330 | punkave.com

thanks a lot i might do this , thanks for your help , by the way does apostrophe support arabic language

boutell commented 5 years ago

Should work fine since it supports unicode. I know others have done it in the past. The editing interface does not currently have any right-to-left CSS styles on offer (another good area for a contribution), but that would not impact the public view of your actual site content.

ammein commented 5 years ago

Hey @alialroomi , I encounter this issue so many times on nodemon. This is mostly Windows issue on removing directories that some of the files were not fully removed based on permissions issue or some sort. Windows can be WTF sometimes. Especially on Permissions. (Please blame on Windows OS platform :D )

To overcome this, restart your terminal by terminating it and open the terminal again OR running nodemon again until it succeeds. Most of the time, you have to re-open the folder on VSCode that might fully removed the files when it is not occupied by VSCode file reader. Some most of the cases is that you have to restart / reopen to overcome this issue on Windows.

boutell commented 5 years ago

@ammein have you seen this with plain "node app" and not nodemon?

ammein commented 5 years ago

@boutell yes, but rarely the case happen on some condition. I don't know if the file is fully removed or there is some race condition happen. But when in Nodemon, it happens after 5 or more restarts.