0

Goodday, I ve been working on a project and had to install git, nodejs, npm. My OS is ubuntu 18. I ran into alot of errors and I will describe the steps I took, since one of them made me trip and fall down really hard. And showed me that it is without help not fixable. Back to topic, the steps were (terminal):

  1. installing git -> led to the error:

fatal: Not a git repository (or any parent up to mount point /home/ubuntuadmin) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)

;

  1. installed npm (without nodejs) -> tried to run npm within the folder of project -> Error occured:

serverless offline start

sh: 1: serverless: not found npm ERR! weird error 127 npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

3) I installed npm modules and this error occured:

npm ERR! Error: CERT_UNTRUSTED

npm ERR! at SecurePair. (tls.js:1370:32)

npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)

npm ERR! at SecurePair.maybeInitFinished (tls.js:982:10)

npm ERR! at CleartextStream.read [as _read] (tls.js:469:13)

npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)

npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25)

npm ERR! at doWrite (_stream_writable.js:223:10)

npm ERR! at writeOrBuffer (_stream_writable.js:213:5)

npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:180:11)

npm ERR! at write (_stream_readable.js:583:24)

npm ERR! at flow (_stream_readable.js:592:7)

npm ERR! at Socket.pipeOnReadable (_stream_readable.js:624:5)

npm ERR! If you need help, you may report this log at:

npm ERR! http://github.com/isaacs/npm/issues

npm ERR! or email it to:

npm ERR!

npm ERR! System Linux 4.4.0-137-generic

npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"

npm ERR! cwd /home/ubuntuadmin/goldpreis-api

npm ERR! node -v v0.10.25

npm ERR! npm -v 1.3.10

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR! /home/ubuntuadmin/goldpreis-api/npm-debug.log

npm ERR! not ok code 0

3.1) I fixed the errors from 3 and now only WARN occure. But after I typed npm start, this error poped up:

goldpreis-api@1.0.0 start /home/ubuntuadmin/goldpreis-api

serverless offline start

sh: 1: serverless: not found

npm ERR! weird error 127

npm WARN This failure might be due to the use of legacy binary "node"

npm WARN For further explanations, please read

/usr/share/doc/nodejs/README.Debian

npm ERR! not ok code 0

4)then I tried: npm i -D serverless which led to npm ERR! Error: EACCES(lost the rest of the error code) -> then googled that one and found an answere there: Eacces

->that led to an error after running npm install: [...] npm warn unmet dependencies [...] (googled them and found this:npm warn unmet dependencies)

4.1) After trying to fix it and failed with error . I tried looking it up and googling it I found a post on stackoverflow (link: stackoverflow)

4.2)The creating or bypassing of package.json didnt work so I googled it and went to the website: doc.npmjs.com -> this brought up the error:

ubuntuadmin@ubuntuadmin:~/goldpreis-api$ npm status

/usr/local/lib/node_modules/npm/bin/npm-cli.js:85

let notifier = require('update-notifier')({pkg}) ^^^^^^^^ SyntaxError: Unexpected identifier

at Module._compile (module.js:439:25)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Function.Module.runMain (module.js:497:10)

at startup (node.js:119:16)

at node.js:902:3

Doesn't matter what I write in the terminal ie:npm, npm start, npm status it always showes up. Appreciate all the help I can get.

A-L
  • 57
  • 1
  • 7
  • try to install `nvm` first and with it, you can install any `node` version. – Mohammad Rajabloo Oct 12 '18 at 17:39
  • hello mohammad, i have already installed nvm. But for some reason when i type `sudo apt-get install nvm` in the ubuntu terminal it showes `E: unable to locate package nvm` – A-L Oct 14 '18 at 12:40
  • hi, you should use this Github repo to install `nvm` `https://github.com/creationix/nvm` – Mohammad Rajabloo Oct 15 '18 at 09:52
  • hey mohammad, ive almost finished this article until i reached the test section. when i try npm install`the syntaxerror appears (the last error message). – A-L Oct 15 '18 at 12:26
  • look, in this situations, I always remove everything (the software that not working) and install it again, I think you have installed some software before and these errors are because your old software and the new one are conflicts. maybe I'm wrong . but if you remove it and install it again and error exist, try to reinstall your os, and I say again. maybe I'm wrong. – Mohammad Rajabloo Oct 15 '18 at 17:31
  • well the error has been removed. it was a conflict within the programm, i reinstalled everything. my mistake was to use "sudo"-command and non-sudo. but now its working fine. thanks anyways. – A-L Oct 19 '18 at 14:22

0 Answers0