title: npm Syntaxerror: unexpected Identifier
body: <p>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): </p>
  
  <ol>
  <li>installing git -> led to the error:</li>
  </ol>
  
  <blockquote>
    <p>fatal: Not a git repository (or any parent up to mount point
    /home/ubuntuadmin) Stopping at filesystem boundary
    (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)</p>
  </blockquote>
  
  <p>; </p>
  
  <ol start="2">
  <li>installed npm (without nodejs) -> tried to run npm within the
  folder of project -> Error occured:</li>
  </ol>
  
  <blockquote>
    <p>serverless offline start</p>
    
    <p>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</p>
    
    <p>npm ERR! not ok code 0</p>
    
    <p>3) I installed npm modules and this error occured:</p>
    
    <p>npm ERR! Error: CERT_UNTRUSTED</p>
    
    <p>npm ERR! at SecurePair. (tls.js:1370:32)</p>
    
    <p>npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)</p>
    
    <p>npm ERR! at SecurePair.maybeInitFinished (tls.js:982:10)</p>
    
    <p>npm ERR! at CleartextStream.read [as _read] (tls.js:469:13)</p>
    
    <p>npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)</p>
    
    <p>npm ERR! at EncryptedStream.write [as _write] (tls.js:366:25)</p>
    
    <p>npm ERR! at doWrite (_stream_writable.js:223:10)</p>
    
    <p>npm ERR! at writeOrBuffer (_stream_writable.js:213:5)</p>
    
    <p>npm ERR! at EncryptedStream.Writable.write
    (_stream_writable.js:180:11)</p>
    
    <p>npm ERR! at write (_stream_readable.js:583:24)</p>
    
    <p>npm ERR! at flow (_stream_readable.js:592:7)</p>
    
    <p>npm ERR! at Socket.pipeOnReadable (_stream_readable.js:624:5)</p>
    
    <p>npm ERR! If you need help, you may report this log at:</p>
    
    <p>npm ERR! <a href="http://github.com/isaacs/npm/issues" rel="nofollow noreferrer">http://github.com/isaacs/npm/issues</a></p>
    
    <p>npm ERR! or email it to:</p>
    
    <p>npm ERR! </p>
    
    <p>npm ERR! System Linux 4.4.0-137-generic</p>
    
    <p>npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"</p>
    
    <p>npm ERR! cwd /home/ubuntuadmin/goldpreis-api</p>
    
    <p>npm ERR! node -v v0.10.25</p>
    
    <p>npm ERR! npm -v 1.3.10</p>
    
    <p>npm ERR! </p>
    
    <p>npm ERR! Additional logging details can be found in:</p>
    
    <p>npm ERR! /home/ubuntuadmin/goldpreis-api/npm-debug.log</p>
    
    <p>npm ERR! not ok code 0</p>
  </blockquote>
  
  <p>3.1) I fixed the errors from 3 and now only WARN occure. But after I typed <code>npm start</code>, this error poped up:</p>
  
  <blockquote>
    <p>goldpreis-api@1.0.0 start /home/ubuntuadmin/goldpreis-api</p>
    
    <p>serverless offline start</p>
    
    <p>sh: 1: serverless: not found</p>
    
    <p>npm ERR! weird error 127</p>
    
    <p>npm WARN This failure might be due to the use of legacy binary "node"</p>
    
    <p>npm WARN For further explanations, please read</p>
    
    <p>/usr/share/doc/nodejs/README.Debian</p>
    
    <p>npm ERR! not ok code 0</p>
  </blockquote>
  
  <p>4)then I tried: <code>npm i -D serverless</code> which led to <code>npm ERR! Error: EACCES</code>(lost the rest of the error code) -> then googled that one and found an answere there: <a href="https://stackoverflow.com/questions/38323880/error-eacces-permission-denied">Eacces</a></p>
  
  <p>->that led to an error after running npm install: [...]
  npm warn unmet dependencies [...] (googled them and found this:<a href="https://stackoverflow.com/questions/20764881/why-does-npm-install-say-i-have-unmet-dependencies#20765400">npm warn unmet dependencies</a>)</p>
  
  <p>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: <a href="https://stackoverflow.com/questions/21855035/ssl-error-cert-untrusted-while-using-npm-command#22526046">stackoverflow</a>)</p>
  
  <p>4.2)The creating or bypassing of package.json didnt work so I googled it and went to the website: <a href="https://docs.npmjs.com/files/package.json" rel="nofollow noreferrer">doc.npmjs.com</a>
  -> this brought up the error: </p>
  
  <blockquote>
    <p>ubuntuadmin@ubuntuadmin:~/goldpreis-api$ npm status</p>
    
    <p>/usr/local/lib/node_modules/npm/bin/npm-cli.js:85</p>
    
    <p>let notifier = require('update-notifier')({pkg})
              ^^^^^^^^ SyntaxError: Unexpected identifier</p>
    
    <p>at Module._compile (module.js:439:25)</p>
    
    <p>at Object.Module._extensions..js (module.js:474:10)</p>
    
    <p>at Module.load (module.js:356:32)</p>
    
    <p>at Function.Module._load (module.js:312:12)</p>
    
    <p>at Function.Module.runMain (module.js:497:10)</p>
    
    <p>at startup (node.js:119:16)</p>
    
    <p>at node.js:902:3</p>
  </blockquote>
  
  <p>Doesn't matter what I write in the terminal <code>ie:npm, npm start, npm status</code> it always showes up.
  Appreciate all the help I can get.</p>