4
respostas

Não consigo rodar o "npm install"

Eu programo no Zorin. E uso o "Hyper" como terminal, quando executo o "npm install" esse erro aparece

joao@JoaoZandona:~$ cd Desktop
joao@JoaoZandona:~/Desktop$ cd casadocodigo
joao@JoaoZandona:~/Desktop/casadocodigo$ npm install
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/ecc-jsbn-44cb83f9/LICENSE'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/safe-buffer-035dccc7/package.json'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/qs-5beb234b/package.json'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/ecc-jsbn-44cb83f9/README.md'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/safe-buffer-035dccc7/index.d.ts'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/qs-5beb234b/.editorconfig'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/ecc-jsbn-44cb83f9/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/safe-buffer-035dccc7/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/qs-5beb234b/.eslintignore'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/safe-buffer-035dccc7/LICENSE'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/qs-5beb234b/.eslintrc'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/safe-buffer-035dccc7/README.md'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/qs-5beb234b/CHANGELOG.md'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/qs-5beb234b/LICENSE'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/qs-5beb234b/README.md'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/source-map-48974dd7/dist/source-map.js'
npm WARN tar ENOENT: no such file or directory, open '/home/joao/Desktop/casadocodigo/node_modules/.staging/sqlite3-f018895a/deps/sqlite3.gyp'
npm WARN casadocodigo@1.0.0 No repository field.

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz
npm ERR! 404 
npm ERR! 404  'event-stream@3.3.6' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'casadocodigo'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/joao/.npm/_logs/2020-07-25T18_41_44_620Z-debug.log
joao@JoaoZandona:~/Desktop/casadocodigo$ 
4 respostas

Tentei apagar a node_modules, e a package lock.json e ainda tem erro. Mas dessa vez esse:

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 4.15.0-91-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/joao/Desktop/casadocodigo/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/joao/Desktop/casadocodigo/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=6" "--node_abi_napi=napi"
gyp ERR! cwd /home/joao/Desktop/casadocodigo/node_modules/sqlite3
gyp ERR! node -v v14.6.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN casadocodigo@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@4.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/joao/.npm/_logs/2020-07-25T18_49_19_989Z-debug.log
joao@JoaoZandona:~/Desktop/casadocodigo$ 

Reinstala o NODE

Não funcionou não sei oq fazer agr?

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN casadocodigo@1.0.0 No repository field.

node_sqlite3.target.mk:131: recipe for target 'Release/obj.target/node_sqlite3/src/database.o' failed
make: *** [Release/obj.target/node_sqlite3/src/database.o] Error 1
make: Leaving directory '/home/joao/Desktop/casadocodigo/node_modules/sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/joao/.nvm/versions/node/v14.6.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 4.15.0-91-generic
gyp ERR! command "/home/joao/.nvm/versions/node/v14.6.0/bin/node" "/home/joao/.nvm/versions/node/v14.6.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/joao/Desktop/casadocodigo/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/joao/Desktop/casadocodigo/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=6" "--node_abi_napi=napi"
gyp ERR! cwd /home/joao/Desktop/casadocodigo/node_modules/sqlite3
gyp ERR! node -v v14.6.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sqlite3@4.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sqlite3@4.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/joao/.npm/_logs/2020-07-27T17_37_00_461Z-debug.log

tenta usar o yarn install mas eu não sei se o yarn é um braço do npm, ele é mais leve que o npm, mas se ele for uma parte, você vai ter que baixar o npm.

Você quer subir servidor web para testar pagina ?

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software