Skip to content
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

[BUG] I encountered the following problem when running npx create-next-app #7286

Closed
2 tasks done
vhko opened this issue Mar 14, 2024 · 2 comments
Closed
2 tasks done
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x

Comments

@vhko
Copy link

vhko commented Mar 14, 2024

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

When I ran npx create-next-app I encountered
image
Here are the details from the log file

0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 3ms
6 timing config:load:builtin Completed in 3ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:D:\Code\React\.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\Hirsc\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\Hirsc\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:setEnvs Completed in 0ms
16 timing config:load Completed in 8ms
17 timing npm:load:configload Completed in 8ms
18 timing config:load:flatten Completed in 1ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm exec create-next-app
22 verbose argv "exec" "--" "create-next-app"
23 timing npm:load:setTitle Completed in 1ms
24 timing npm:load:display Completed in 0ms
25 verbose logfile logs-max:10 dir:C:\Users\Hirsc\AppData\Local\npm-cache\_logs\2024-03-14T13_20_43_694Z-
26 verbose logfile C:\Users\Hirsc\AppData\Local\npm-cache\_logs\2024-03-14T13_20_43_694Z-debug-0.log
27 timing npm:load:logFile Completed in 6ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 38ms
31 silly logfile start cleaning logs, removing 3 files
32 timing arborist:ctor Completed in 0ms
33 silly logfile error removing log file C:\Users\Hirsc\AppData\Local\npm-cache\_logs\2024-03-14T11_44_43_565Z-debug-0.log [Error: EPERM: operation not permitted, lstat 'C:\Users\Hirsc\AppData\Local\npm-cache\_logs\2024-03-14T11_44_43_565Z-debug-0.log'] {
33 silly logfile   errno: -4048,
33 silly logfile   code: 'EPERM',
33 silly logfile   syscall: 'lstat',
33 silly logfile   path: 'C:\\Users\\Hirsc\\AppData\\Local\\npm-cache\\_logs\\2024-03-14T11_44_43_565Z-debug-0.log'
33 silly logfile }
34 silly logfile done cleaning log files
35 http fetch GET 200 https://registry.npmjs.org/create-next-app 5960ms (cache miss)
36 timing arborist:ctor Completed in 0ms
37 timing command:exec Completed in 5987ms
38 verbose stack Error: ENOENT: no such file or directory, lstat 'C:\Users\Hirsc\AppData\Roaming\npm'
39 verbose cwd D:\Code\React
40 verbose Windows_NT 10.0.22631
41 verbose node v20.11.1
42 verbose npm  v10.2.4
43 error code ENOENT
44 error syscall lstat
45 error path C:\Users\Hirsc\AppData\Roaming\npm
46 error errno -4058
47 error enoent ENOENT: no such file or directory, lstat 'C:\Users\Hirsc\AppData\Roaming\npm'
48 error enoent This is related to npm not being able to find a file.
48 error enoent
49 verbose exit -4058
50 timing npm Completed in 6233ms
51 verbose code -4058
52 error A complete log of this run can be found in: C:\Users\Hirsc\AppData\Local\npm-cache\_logs\2024-03-14T13_20_43_694Z-debug-0.log

Expected Behavior

I hope someone can help me solve this problem🙏

Steps To Reproduce

  1. In this environment...
  2. With this config...
  3. Run '...'
  4. See error...

Environment

  • npm:10.2.4
  • Node.js:v20.11.1
  • OS Name:Windows 11 23H2
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here
@vhko vhko added Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x labels Mar 14, 2024
@milaninfy
Copy link
Contributor

@vhko as a workaround try creating a npm folder manually at C:\Users\Hirsc\AppData\Roaming\

@vhko
Copy link
Author

vhko commented Mar 15, 2024

@vhko as a workaround try creating a npm folder manually at C:\Users\Hirsc\AppData\Roaming\

Thank you, my problem is solved🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 10.x
Projects
None yet
Development

No branches or pull requests

2 participants