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):
- 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)
;
- 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.