0

Cannot find module 'C:\Users\wp\node-intro\node_modules\car-names\dist\index.js'. Please verify that the package.json has a valid "main" entry at tryPackage (node:internal/modules/cjs/loader:438:19) at Module._findPath (node:internal/modules/cjs/loader:680:18) at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27) at Module._load (node:internal/modules/cjs/loader:922:27) at Module.require (node:internal/modules/cjs/loader:1143:19) at require (node:internal/modules/cjs/helpers:110:18) at Object. (C:\Users\wp\node-intro\index.js:3:14) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) { code: 'MODULE_NOT_FOUND', path: 'C:\Users\wp\node-intro\node_modules\car-names\package.json', requestPath: 'car-names' }

Node.js v18.16.1

1 Answers1

0

I was suffering from same issue when I created file Schemas. So I just moved the file in main folder so u have to move your folder to the main file in which all the files are saved while creating your project. "In your case I think Your file is moved into Module._compile do check and move that into wp " I think it will help

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 02 '23 at 12:57