2 Replies Latest reply on Sep 15, 2015 11:39 AM by leydar

    NPM package.json empty

    leydar

      I'm having trouble using NPM on 3.10.17-poky-edison+. Some of the package.json files are empty. Is there anyway to rebuild or download current versions of the list? When I downloaded the package.json it failed for other dependencies.

       

      root@edison:~/sandbox# npm install forever -g                                 
      npm ERR! Failed to parse json     
      npm ERR! Unexpected end of input  
      npm ERR! File: /home/root/.npm/utile/0.2.1/package/package.json               
      npm ERR! Failed to parse package.json data.                                   
      npm ERR! package.json must be actual JSON, not just JavaScript.               
      npm ERR!                          
      npm ERR! This is not a bug in npm.
      npm ERR! Tell the package author to fix their package.json file. JSON.parse   

      npm ERR! System Linux 3.10.17-poky-edison+    

      npm ERR! command "node" "/usr/bin/npm" "install" "forever" "-g"           

       

      npm ERR! cwd /home/root/sandbox   
      npm ERR! node -v v0.10.35         
      npm ERR! npm -v 1.4.28            
      npm ERR! file /home/root/.npm/utile/0.2.1/package/package.json                
      npm ERR! code EJSONPARSE          

      npm ERR! not ok code 0

       

      Stephen

        • 1. Re: NPM package.json empty
          Intel_Peter

          Hello leydar,

           

          I'm not sure why you are getting these error messages. I just tested it on your same conditions:

           

          uname -a
          Linux Peter 3.10.17-poky-edison+ #1 SMP PREEMPT Fri Jun 19 12:06:40 CEST 2015 i686 GNU/Linux
          

           

          And it was able to install the forever module. This is the output of the command npm install forever -g:

           

          /usr/bin/forever -> /usr/lib/node_modules/forever/bin/forever
          forever@0.15.1 /usr/lib/node_modules/forever
          ├── path-is-absolute@1.0.0
          ├── object-assign@3.0.0
          ├── colors@0.6.2
          ├── clone@1.0.2
          ├── timespan@2.3.0
          ├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
          ├── nssocket@0.5.3 (eventemitter2@0.4.14, lazy@1.0.11)
          ├── winston@0.8.3 (cycle@1.0.3, stack-trace@0.0.9, eyes@0.1.8, isstream@0.1.2, async@0.2.10, pkginfo@0.3.0)
          ├── cliff@0.1.10 (eyes@0.1.8, colors@1.0.3)
          ├── shush@1.0.0 (strip-json-comments@0.1.3, caller@0.0.1)
          ├── utile@0.2.1 (deep-equal@1.0.1, ncp@0.4.2, async@0.2.10, i@0.3.3, mkdirp@0.5.1, rimraf@2.4.3)
          ├── nconf@0.6.9 (ini@1.3.4, async@0.2.9, optimist@0.6.0)
          ├── prettyjson@1.1.3 (colors@1.1.2, minimist@1.2.0)
          ├── flatiron@0.4.3 (optimist@0.6.0, director@1.2.7, prompt@0.2.14, broadway@0.3.6)
          └── forever-monitor@1.6.0 (minimatch@2.0.10, ps-tree@0.0.3, chokidar@1.0.5, broadway@0.3.6)
          

           

          There might have been a server issue when you tried to install it that could have caused this behavior. Why don't you try again?

           

          Peter.

          • 2. Re: NPM package.json empty
            leydar

            Hi Peter

             

            Thanks for trying that. I've reinstalled the image with `reboot ota` and tried again to no avail. I've also run in from my windows system here and it installed fine. It's currently taking a really long time to fail on the Edison. Ah, never mind, I just killed and re-established the wifi configuration and lo and behold it worked. Thanks again.

             

            Stephen