# ENOTEMPTY when installing node from palette since nodered 3.0 (directory not empty)

**URL:** <https://discourse.nodered.org/t/enotempty-when-installing-node-from-palette-since-nodered-3-0-directory-not-empty/65968>\
**Category:** General\
**Tags:** docker\
**Created:** [3 August 2022 11:42 UTC](https://discourse.nodered.org/t/enotempty-when-installing-node-from-palette-since-nodered-3-0-directory-not-empty/65968 "2022-08-03T11:42:39Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 August 2022 08:19 UTC](https://discourse.nodered.org/t/enotempty-when-installing-node-from-palette-since-nodered-3-0-directory-not-empty/65968/13 "2022-08-05T08:19:28Z")

</div>

Others are encountering this issue too.

> <https://github.com/npm/cli/issues/4096>
>
> \### Is there an existing issue for this?
> 
> \- \[X\] I have searched the existing iss…ues
> 
> \### This issue exists in the latest npm version
> 
> \- \[X\] I am using the latest npm
> 
> \### Current Behavior
> 
> \`\`\`bash
> ➜ create-config git:(feat/eslint-init) npm i typescript -g
> npm ERR! code ENOTEMPTY
> npm ERR! syscall rename
> npm ERR! path /Users/weiran/.npm-global/lib/node\_modules/typescript
> npm ERR! dest /Users/weiran/.npm-global/lib/node\_modules/.typescript-ffKYZhoU
> npm ERR! errno -66
> npm ERR! ENOTEMPTY: directory not empty, rename '/Users/weiran/.npm-global/lib/node\_modules/typescript' -\> '/Users/weiran/.npm-global/lib/node\_modules/.typescript-ffKYZhoU'
> 
> npm ERR! A complete log of this run can be found in:
> npm ERR! /Users/weiran/.npm/\_logs/2021-11-26T07\_32\_40\_759Z-debug.log
> \`\`\`
> 
> \### Expected Behavior
> 
> global typescript installed without error.
> 
> \### Steps To Reproduce
> 
> \_No response\_
> 
> \### Environment
> 
> \- npm: 8.1.4
> \- Node: v17.0.1
> \- OS: macOS 12.1
> \- platform:
> \- npm config:
> \`\`\`ini
> ; copy and paste output from \`npm config ls\` here
> ; "user" config from /Users/weiran/.npmrc
> 
> //git.dian.so/api/v4/packages/npm/:\_authToken = (protected) 
> //npm.xiaodiankeji.net/:\_authToken = (protected) 
> //registry.npmjs.org/:\_authToken = (protected) 
> home = "https://npm.taobao.org" 
> http-proxy = "http://127.0.0.1:8118" 
> https-proxy = "http://127.0.0.1:8118/" 
> init-author-name = "weiran" 
> ; package-lock = true ; overridden by project
> prefix = "/Users/weiran/.npm-global" 
> proxy = "http://127.0.0.1:8118/" 
> 
> ; "project" config from /Users/weiran/repo/github/create-config/.npmrc
> 
> package-lock = false 
> 
> ; node bin location = /usr/local/bin/node
> ; cwd = /Users/weiran/repo/github/create-config
> ; HOME = /Users/weiran
> ; Run \`npm config ls -l\` to show all defaults.
> \`\`\`

> <https://github.com/firebase/firebase-tools/issues/4353>
>
> \<!-- DO NOT DELETE
> validate\_template=true
> template\_path=.github/ISSUE\_TEMPLATE…/bug\_report.md
> \--\>
> 
> \<!--
> Thank you for contributing to the Firebase community!
> 
> Think you found a bug?
> =======================
> Yeah, we're definitely not perfect! Please use this template and include a minimal repro when opening the issue. If you know how to solve the issue, please create a Pull Request, and we'd be happy to review it!
> 
> Have a feature request?
> ========================
> Great, we love hearing how we can improve our products! However, do not use this template to submit a feature request. Please submit your feature requests to: https://firebase.google.com/support/contact/bugs-features/
> 
> Have a usage question?
> =======================
> We get lots of those and we love helping you, but GitHub is not the best place for them and they will be closed. Please take a look at the guide first: https://firebase.google.com/docs/cli/
> 
> If the official documentation doesn't help, try asking through our official support channel: https://firebase.google.com/support/
> 
> Additional locations to check for solutions or assistance from the community:
> \- Stack Overflow: https://stackoverflow.com/
> \- Firebase Slack Community: https://firebase.community/
> 
> \*Please avoid duplicate posting across multiple channels!\*
> \--\>
> 
> \### \[REQUIRED\] Environment info
> 
> 
> 
> 
> 
> \*\*firebase-tools:\*\* 10.2.2
> 
> 
> 
> \*\*Platform:\*\* macOS
> 
> \### \[REQUIRED\] Test case
> 
> 
> \`\`\`
> (base) foxtom@MacBook-Pro-de-FoxTom myproject % sudo npm install -g firebase-tools 
> Password:
> npm ERR! code ENOTEMPTY
> npm ERR! syscall rename
> npm ERR! path /usr/local/lib/node\_modules/firebase-tools
> npm ERR! dest /usr/local/lib/node\_modules/.firebase-tools-ENG41nb9
> npm ERR! errno -66
> npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node\_modules/firebase-tools' -\> '/usr/local/lib/node\_modules/.firebase-tools-ENG41nb9'
> 
> npm ERR! A complete log of this run can be found in:
> npm ERR! /Users/foxtom/.npm/\_logs/2022-03-23T16\_07\_07\_098Z-debug-0.log
> \`\`\`
> 
> \### \[REQUIRED\] Steps to reproduce
> !\[Capture d’écran 2022-03-23 à 17 09 50\](https://user-images.githubusercontent.com/32631467/159744742-379ad819-3e90-4c05-b122-cafd9c430247.png)
> 
> As asked by the message, run \`\`\`sudo npm install -g firebase-tools\`\`\` (if you run without \`sudo\` you will get a permission denied error)
> 
> \### \[REQUIRED\] Expected behavior
> 
> Be able to update the CLI tools.
> 
> \### \[REQUIRED\] Actual behavior
> 
> \`\`\`
> npm ERR! code ENOTEMPTY
> npm ERR! syscall rename
> npm ERR! path /usr/local/lib/node\_modules/firebase-tools
> npm ERR! dest /usr/local/lib/node\_modules/.firebase-tools-ENG41nb9
> npm ERR! errno -66
> npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node\_modules/firebase-tools' -\> '/usr/local/lib/node\_modules/.firebase-tools-ENG41nb9'
> 
> npm ERR! A complete log of this run can be found in:
> npm ERR! /Users/foxtom/.npm/\_logs/2022-03-23T16\_07\_07\_098Z-debug-0.log
> \`\`\`
> 
> I have to delete the directory manually to fix this and i would prefer to not do this by myself

> <https://github.com/homebridge/homebridge/issues/3146>
>
> \### Current Situation
> 
> When I updated to v4.43.3 I received a similar error to b…elow. I was able to get around it by updating it via terminal from some guide that I found online however just trying to update to v4.45.0 the same thing has happened again.
> 
> Am I going to have to keep forcing it to happen via terminal or is there someway that I can fix this issue so that I can just update using the UI. I really don't understand the terminal side of things in great detail and feel like I might break my installation if I mess with it too much.
> 
> USER: pi
> DIR: /usr/local
> CMD: sudo -E -n npm install -g homebridge-config-ui-x@latest
> 
> npm ERR! code ENOTEMPTY
> npm ERR! syscall rename
> npm ERR! path /usr/local/lib/node\_modules/homebridge-config-ui-x
> npm ERR! dest /usr/local/lib/node\_modules/.homebridge-config-ui-x-3gtnOIj4
> npm ERR! errno -39
> npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node\_modules/homebridge-config-ui-x' -\> '/usr/local/lib/node\_modules/.homebridge-config-ui-x-3gtnOIj4'
> 
> npm ERR! A complete log of this run can be found in:
> npm ERR! /home/pi/.npm/\_logs/2022-05-24T22\_06\_22\_459Z-debug.log
> 
> Cleaning up npm cache, please wait...
> npm cache cleared, please try updating homebridge-config-ui-x again.
> 
> Command failed. Please review log for details.
> 
> Thanks
> 
> 
> \### Logs
> 
> \`\`\`markdown
> none
> \`\`\`
> 
> 
> \### Configuration
> 
> \`\`\`json
> none
> \`\`\`
> 
> 
> \### Environment
> 
> \- OS:
> \- Software:
> \- Node:
> \- npm:
> 
> 
> \### Process Supervisor
> 
> hb-service
> 
> \### Additional Context
> 
> \_No response\_

and numerous others, but so far have not found any information about what might be triggering it.

---

_[View the full topic](https://discourse.nodered.org/t/enotempty-when-installing-node-from-palette-since-nodered-3-0-directory-not-empty/65968)._
