Not working on Windows
See original GitHub issueGet the following - which I think is related to the paths not being correct
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\.xmlbuilder2.DELETE\node_modules\@types
npm ERR! dest C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\xmlbuilder2\node_modules\@types
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\.xmlbuilder2.DELETE\node_modules\@types' -> 'C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\xmlbuilder2\node_modules\@types'
npm ERR! [OperationalError: EPERM: operation not permitted, rename 'C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\.xmlbuilder2.DELETE\node_modules\@types' -> 'C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\xmlbuilder2\node_modules\@types'] {
npm ERR! cause: [Error: EPERM: operation not permitted, rename 'C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\.xmlbuilder2.DELETE\node_modules\@types' -> 'C:\Users\david\AppData\Roaming\npm-cache\_npx\10136\node_modules\projen\node_modules\xmlbuilder2\node_modules\@types'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\david\\AppData\\Roaming\\npm-cache\\_npx\\10136\\node_modules\\projen\\node_modules\\.xmlbuilder2.DELETE\\node_modules\\@types',
npm ERR! dest: 'C:\\Users\\david\\AppData\\Roaming\\npm-cache\\_npx\\10136\\node_modules\\projen\\node_modules\\xmlbuilder2\\node_modules\\@types'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, rename 'C:\\Users\\david\\AppData\\Roaming\\npm-cache\\_npx\\10136\\node_modules\\projen\\node_modules\\.xmlbuilder2.DELETE\\node_modules\\@types' -> 'C:\\Users\\david\\AppData\\Roaming\\npm-cache\\_npx\\10136\\node_modules\\projen\\node_modules\\xmlbuilder2\\node_modules\\@types'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\david\\AppData\\Roaming\\npm-cache\\_npx\\10136\\node_modules\\projen\\node_modules\\.xmlbuilder2.DELETE\\node_modules\\@types',
npm ERR! dest: 'C:\\Users\\david\\AppData\\Roaming\\npm-cache\\_npx\\10136\\node_modules\\projen\\node_modules\\xmlbuilder2\\node_modules\\@types',
npm ERR! parent: 'projen'
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\david\AppData\Roaming\npm-cache\_logs\2021-01-17T09_59_49_956Z-debug.log
Install for [ 'projen@latest' ] failed with code 4294963248
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:17 (15 by maintainers)
Top Results From Across the Web
[Solved] Windows 10 Not Responding | Quickly & Easily
How to Fix Windows 10 not responding · Restart your computer · Troubleshoot your computer · Update available drivers · Run System File...
Read more >Troubleshoot problems updating Windows - Microsoft Support
Have issues installing Windows updates? Start here. · Free up some drive space so you can run updates · Restart to apply installed...
Read more >What You Should Do If Windows Fails to Start
The quickest way to get to Startup Repair is to hard-power-down your PC while it's booting three times. You normally do this by...
Read more >Windows 10 Won't Boot? 12 Fixes to Get Your PC Running ...
1. Try Windows Safe Mode · 2. Check Your Battery · 3. Unplug All Your USB Devices · 4. Turn Off Fast Boot...
Read more >Windows 10 Troubleshooting: The Most Common Problems ...
Check your Windows 10 device. Make sure airplane mode is turned off (Start > Settings > Network & Internet > Airplane mode). Try...
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 Free
Top 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
I had the same problem. I got projen working in Windows 10 with Node 14.15.4 LTS by using a project-local node_modules. This is what I did:
Ok I’m able to reproduce the issue on node v14 as well. It can also be reproduced by running
npm install -g projen
. Unfortunately I’m not sure how to fix it yet - part of the difficulty is that it’s difficult to test “npm install” using local versions of projen with changes. That said, it appears to be caused by the addition of thexmlbuilder2
library in projen 0.13.10 (commit).The current workarounds I’ve found:
yarn global add projen
and runprojen new <project-type>
to bootstrap your project. Then you can runnpx projen
commands inside the project directory normally. Afterwards, you’re free to remove the global projen command if you’d like to avoid polluting the global namespace viayarn global remove projen
.I’m not really familiar with this kind of bug, but I’d like try pinning different versions of xmlbuilder2 or its dependencies and see if that fixes the bug. Specifically,
xmlbuilder2
has a runtime dependency on@types/node
which could be causing a conflict of some kind.