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

While writing any npm command I'm getting an error #53710

Closed
priyanshtrivedi opened this issue Jul 3, 2024 · 2 comments
Closed

While writing any npm command I'm getting an error #53710

priyanshtrivedi opened this issue Jul 3, 2024 · 2 comments
Labels
wrong repo Issues that should be opened in another repository.

Comments

@priyanshtrivedi
Copy link

Version

While writing any npm command I'm getting an error node:internal/modules/cjs/loader:1148 throw err; ^ Error: Cannot find module '../../package.json' Require stack: - C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli\validate-engines.js - C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli.js - C:\Users\psc\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15) at Module._load (node:internal/modules/cjs/loader:986:27) at Module.require (node:internal/modules/cjs/loader:1233:19) at require (node:internal/modules/helpers:179:18) at Object. (C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli\validate-engines.js:8:49) at Module._compile (node:internal/modules/cjs/loader:1358:14) at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) at Module.load (node:internal/modules/cjs/loader:1208:32) at Module._load (node:internal/modules/cjs/loader:1024:12) at Module.require (node:internal/modules/cjs/loader:1233:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli\validate-engines.js', 'C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli.js', 'C:\Users\psc\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js' ] } Node.js v20.15.0

Platform

node:internal/modules/cjs/loader:1148
  throw err;
  ^

Error: Cannot find module '../../package.json'
Require stack:
- C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli\validate-engines.js
- C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli.js
- C:\Users\psc\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\Users\psc\AppData\Roaming\npm\node_modules\npm\lib\cli\validate-engines.js:8:49)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\psc\\AppData\\Roaming\\npm\\node_modules\\npm\\lib\\cli\\validate-engines.js',
    'C:\\Users\\psc\\AppData\\Roaming\\npm\\node_modules\\npm\\lib\\cli.js',
    'C:\\Users\\psc\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npx-cli.js'
  ]
}

Node.js v20.15.0

Subsystem

No response

What steps will reproduce the bug?

When I write npm init /npx create-react-app or any npm command I'm getting this error..I've tried all the ways available in stack overflow or GitHub

How often does it reproduce? Is there a required condition?

N/A

What is the expected behavior? Why is that the expected behavior?

N/A

What do you see instead?

N/A

Additional information

N/A

@priyanshtrivedi
Copy link
Author

Uploading 17200064757473949070860120694922.jpg…

@RedYetiDev
Copy link
Member

Hi! Could you possibly open an issue in nodejs/help?

In that issue, please make use of markdown features to format your issue. This way, finding the root cause of the issue will be easier. Additionally, please make sure all information is in the right spot in the template.

(Note to members: please do not transfer this issue. The author appears to have put some information in the wrong spots of the template, so it'd be easier if they just reopened it).

@RedYetiDev RedYetiDev closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
@RedYetiDev RedYetiDev added the wrong repo Issues that should be opened in another repository. label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wrong repo Issues that should be opened in another repository.
2 participants