Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

386
Visualizações
Cannot find module '/workspace/mySQL/node_modules/faker/index.js'

Hello I'm trying to build a project but I cant get the terminal to run to the app.js file as it reports an error and I dont know how to fix it. Just to mention that I've downloaded faker package using (npm install faker), also I've created an app.js file and npm init -y to create a package.json for the warnings. But whenever I try to type ( node app.js) I get the following error: internal/modules/cjs/loader.js:329 throw err; ^

Error: Cannot find module '/workspace/mySQL/node_modules/faker/index.js'. Please verify that the package.json has a valid "main" entry

at tryPackage (internal/modules/cjs/loader.js:321:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:534:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/workspace/mySQL/app.js:1:13)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32) {

code: 'MODULE_NOT_FOUND',
path: '/workspace/mySQL/node_modules/faker/package.json',
requestPath: 'faker'

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

as I saw you have added files in the node-modules directory. Remove files from that directory into the main directory.

It will be like this

  • Mysql
    • node-modules
    • app.js
    • package.json
    • file.sql
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda