update latest fails in Mintty terminal from lack of permissions
See original GitHub issueI like to use the terminal Mintty (currently have version 2.9.6), which I open via GitKraken.
After executing npm i -g @codedoc/cli@0.2.0
, I have the following installed
codedoc/cli
0.2.0codedoc/core
0.1.63
Then executing codedoc update latest
crashes. After which, codedoc
isn’t even installed.
twilliams@EDMONDS MINGW64 /c/Code/Blogs/tyson-williams-blog (master)
$ codedoc version
# Fetching version info ...
# @codedoc/cli version 0.2.0 ...................................... latest: 0.2.0
# @codedoc/core version: 0.1.63 ................................... latest: 0.2.0
# WARNING: some packages are missing or need update.
# Please run codedoc update
twilliams@EDMONDS MINGW64 /c/Code/Blogs/tyson-williams-blog (master)
$ codedoc update latest
# Updating CLI to latest version ...
npm ERR! code EPERM
npm ERR! Error: EPERM: operation not permitted, open 'C:\Users\twilliams\AppData\Roaming\npm\codedoc'
npm ERR! at isClobberable (C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:55:3)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:38:27
npm ERR! at Array.forEach (<anonymous>)
npm ERR! at binLink (C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:38:13)
npm ERR! at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
npm ERR! at ret (eval at makeNodePromisifiedEval (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:11:39)
npm ERR! at linkBin (C:\Program Files\nodejs\node_modules\npm\node_modules\bin-links\index.js:126:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\bin-links\index.js:91:12
npm ERR! at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
npm ERR! at MappingPromiseArray._promiseFulfilled (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\map.js:61:38)
npm ERR! at MappingPromiseArray.PromiseArray._iterate (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise_array.js:114:31)
npm ERR! at MappingPromiseArray.init (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise_array.js:78:10)
npm ERR! at MappingPromiseArray._asyncInit (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\map.js:30:10)
npm ERR! at _drainQueueStep (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:142:12)
npm ERR! at _drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:131:9)
npm ERR! at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:147:5)
npm ERR! OperationalError: EPERM: operation not permitted, open 'C:\Users\twilliams\AppData\Roaming\npm\codedoc'
npm ERR! at isClobberable (C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:55:3)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:38:27
npm ERR! at Array.forEach (<anonymous>)
npm ERR! at binLink (C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:38:13)
npm ERR! at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
npm ERR! at ret (eval at makeNodePromisifiedEval (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:11:39)
npm ERR! at linkBin (C:\Program Files\nodejs\node_modules\npm\node_modules\bin-links\index.js:126:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\bin-links\index.js:91:12
npm ERR! at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
npm ERR! at MappingPromiseArray._promiseFulfilled (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\map.js:61:38)
npm ERR! at MappingPromiseArray.PromiseArray._iterate (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise_array.js:114:31)
npm ERR! at MappingPromiseArray.init (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise_array.js:78:10)
npm ERR! at MappingPromiseArray._asyncInit (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\map.js:30:10)
npm ERR! at _drainQueueStep (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:142:12)
npm ERR! at _drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:131:9)
npm ERR! at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:147:5) {
npm ERR! cause: Error: EPERM: operation not permitted, open 'C:\Users\twilliams\AppData\Roaming\npm\codedoc'
npm ERR! at isClobberable (C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:55:3)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:38:27
npm ERR! at Array.forEach (<anonymous>)
npm ERR! at binLink (C:\Program Files\nodejs\node_modules\npm\node_modules\gentle-fs\lib\bin-link.js:38:13)
npm ERR! at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
npm ERR! at ret (eval at makeNodePromisifiedEval (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:11:39)
npm ERR! at linkBin (C:\Program Files\nodejs\node_modules\npm\node_modules\bin-links\index.js:126:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\bin-links\index.js:91:12
npm ERR! at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
npm ERR! at MappingPromiseArray._promiseFulfilled (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\map.js:61:38)
npm ERR! at MappingPromiseArray.PromiseArray._iterate (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise_array.js:114:31)
npm ERR! at MappingPromiseArray.init (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise_array.js:78:10)
npm ERR! at MappingPromiseArray._asyncInit (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\map.js:30:10)
npm ERR! at _drainQueueStep (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:142:12)
npm ERR! at _drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:131:9)
npm ERR! at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:147:5) {
npm ERR! code: 'EPERM'
npm ERR! },
npm ERR! code: 'EPERM'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\twilliams\AppData\Roaming\npm-cache\_logs\2020-06-11T12_01_36_759Z-debug.log
(node:15252) UnhandledPromiseRejectionWarning: undefined
(node:15252) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15252) [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.
twilliams@EDMONDS MINGW64 /c/Code/Blogs/tyson-williams-blog (master)
$ codedoc version
bash: /c/Users/twilliams/AppData/Roaming/npm/codedoc: No such file or directory
The file mentioned in…
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\twilliams\AppData\Roaming\npm-cache\_logs\2020-06-11T12_01_36_759Z-debug.log
…is available here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Mintty does not work under Windows 10 build 10586 #493
Run Windows update so it updates to build 10586. Observe that Mintty refuses to work anymore, and crashes with the error /usr/bin/mintty: could ......
Read more >Permission denied when using mv in Windows 7 Cygwin
I have already tried running Cygwin terminal as Administrator and the problem is the same. I'm open to workarounds, such as trying another...
Read more >Permission denied in Mac Terminal? Try this fix - MacPaw
If you use Terminal to execute commands, you may come across a 'permission denied' error. Here's how to fix it.
Read more >Git file permissions on Windows - Stack Overflow
For example following command adds user execute permission to an arbitrary file: git update-index --chmod=+x <file>.
Read more >Postinstall for mintty fails when installing "just for me"
/bin/mkdir: cannot create directory `/c/Documents and Settings/All Users/Start Menu/Programs/Cygwin': Permission denied mkshortcut: Saving "C:\Documents and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for that.
Everything works 😃
And I am getting smarter too. I now understand that the
-g
innpm i -g @codedoc/cli@0.2.1
is causing a global installation. And that is why you called the option--local
, because@codedoc/core@0.1.63
is not installed globally but in my repo’s.codedoc
folder.Great workaround!
Yes and it should work properly. You can simply install
@codedoc/core@0.1.63
, i.e.