1
resposta

Erro ao instalar o express-validator

Olá, já tentei tudo que foi indicado... O erro permanece, o que devo fazer? Grato.

Abaixo o que está ocorrendo no meu caso...

C:\casadocodigo>npm install

┌───────────────────────────────────────────────────────────────┐ │ npm update check failed │ │ Try running with sudo or get access │ │ to the local update config store via │ │ sudo chown -R $USER:$(id -gn $USER) C:\Users\RodrigoS.config │ └───────────────────────────────────────────────────────────────┘

sqlite3@4.0.2 install C:\casadocodigo\node_modules\sqlite3 node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download [sqlite3] Success: "C:\casadocodigo\node_modules\sqlite3\lib\binding\node-v64-win32-x64\node_sqlite3.node" is installed via remote

nodemon@1.18.4 postinstall C:\casadocodigo\node_modules\nodemon node bin/postinstall || exit 0

npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN casadocodigo@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 425 packages from 267 contributors and audited 2662 packages in 110.552s found 0 vulnerabilities

C:\casadocodigo>npm starte

Usage: npm

where is one of: access, adduser, audit, bin, bugs, c, cache, ci, cit, completion, config, create, ddp, dedupe, deprecate, dist-tag, docs, doctor, edit, explore, get, help, help-search, hook, i, init, install, install-test, it, link, list, ln, login, logout, ls, outdated, owner, pack, ping, prefix, profile, prune, publish, rb, rebuild, repo, restart, root, run, run-script, s, se, search, set, shrinkwrap, star, stars, start, stop, t, team, test, token, tst, un, uninstall, unpublish, unstar, up, update, v, version, view, whoami

npm -h quick help on npm -l display full usage info npm help search for help on npm help npm involved overview

Specify configs in the ini-formatted file: C:\Users\RodrigoS.npmrc or on the command line via: npm --key value Config info can be viewed via: npm help config

npm@6.4.1 C:\Program Files\nodejs\node_modules\npm

Did you mean one of these? start star stars

C:\casadocodigo>npm start

casadocodigo@1.0.0 start C:\casadocodigo nodemon server.js --ignore *.marko.js

[nodemon] 1.18.4 [nodemon] to restart at any time, enter rs [nodemon] watching: . [nodemon] starting node server.js internal/modules/cjs/loader.js:583 throw err; ^

Error: Cannot find module 'express-validator/check' at Function.Module.resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module.load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (C:\casadocodigo\src\app\rotas\rotas.js:3:37) at Module.compile (internal/modules/cjs/loader.js:689:30) at Object.Module.extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) [nodemon] app crashed - waiting for file changes before starting...

1 resposta

Boa noite, Rodrigo! Como vai?

Como vc fez para instalar o módulo express-validator? Qual foi o código que vc executou no terminal? Outra coisa, vc poderia colar aqui o conteúdo completo do arquivo package.json para que eu possa dar uma olhada? Com essas informações eu poderei ter uma ideia melhor do que está acontecendo pra tentar te ajudar!

Qualquer coisa é só falar!

Grande abraço e bons estudos, meu aluno!