-
Notifications
You must be signed in to change notification settings - Fork 12k
Error ng serve cannot read C: directory : Access is denied #29664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For the record, I tried the obvious workaround based on No dice. C:\Users\me\git\tests\coreapp-dashboard-main\coreapp-dashboard-main>
subst k: C:\me\me\git\tests\coreapp-dashboard-main
C:\Users\me\git\tests\coreapp-dashboard-main\coreapp-dashboard-main>k:
K:\>cd coreapp-dashboard-main
K:\coreapp-dashboard-main>npm run local
> [email protected] local
> ng serve --configuration=local --open --port 5200
Initial chunk files | Names | Raw size
styles.css | styles | 474.19 kB |
polyfills.js | polyfills | 93.00 kB |
scripts.js | scripts | 7.47 kB |
main.js | main | 1.46 kB |
| Initial total | 576.12 kB
Application bundle generation complete. [4.169 seconds]
Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
➜ Local: http://localhost:5200/
➜ press h + enter to show help
✘ [ERROR] Cannot read directory "C:/": Access is denied. I am also on a corporate laptop, with GPO like "Configuration > Administrative Templates > Windows Components > File Explorer > Prevent users from adding files to the root of their users'", similar to this thread. Question @alan-agius4 : why accessing |
Node.js locates We should probably mark directories that are inaccessible as non-existent Similar to how it is handled by esbuild evanw/esbuild#938. However, it's unclear whether this issue is related to Angular CLI or another underlying tool. |
I was hoping that, when executed from a "subst'd" drive (here K:), that root of the filesystem would have been K:, which I can read and write into, since it is a folder that I created ( I still don't understand why Node would ever consider anything outside my project structure, though (beside known global folders, or a
But if the process of “marking directories that are inaccessible as non-existent” something that can be done in Angular, wouldn't that benefit all the other tools using it? |
It is strange @alan-agius4. Moreover, the error happens when I try to run For the record, Angular project with version 15 and below are working fine but upper are not working anymore and triggering the problem. Here is the current config that is encountering the problem:
|
Command
serve
Is this a regression?
The previous version in which this bug was not present was
15.2
Description
Angular access denied in C: //
Context
I built an angular app in my personal computer. This app launch a little dashboard so far.
I tried to clone it into my professional computer to have access to some feature. In this computer, I have limited privileges, which means no writings rights on C:.
When I ran
npm install
, everything went well.But when I ran
npm run start
i got the following errorQuestion
How to fix it ?
And most importantly, why Angular is trying to access on C:// instead of staying in his own folder ??
Other elements
Here is the
package.json
:Other notes
This error also happen when create a project with
ng new
Minimal Reproduction
npm install
npm run local
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: