0

I am trying to install paperwork, and while following

https://github.com/twostairs/paperwork/wiki/Installing-Paperwork-on-Ubuntu-14.10

I got near the very end when I get this.

:/var/log/nginx# npm install
npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/var/log/nginx/package.json'
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-@googlegroups.com>

npm ERR! System Linux 3.13.0-43-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /var/log/nginx
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /var/log/nginx/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /var/log/nginx/npm-debug.log
npm ERR! not ok code 0   

I used This for installing the node and npm. How can I update my nodeJS to the latest version?

I have never used any of this, and so I do not know anything about this "node" or anything like it.

Log :

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'install' ]
2 info using npm@1.3.10
3 info using node@v0.10.25
4 error install Couldn't read dependencies
5 error Error: ENOENT, open '/var/log/nginx/package.json'
6 error If you need help, you may report this log at:
6 error     <http://github.com/isaacs/npm/issues>
6 error or email it to:
6 error     <npm-@googlegroups.com>
7 error System Linux 3.13.0-43-generic
8 error command "/usr/bin/nodejs" "/usr/bin/npm" "install"
9 error cwd /var/log/nginx
10 error node -v v0.10.25
11 error npm -v 1.3.10
12 error path /var/log/nginx/package.json
13 error code ENOENT
14 error errno 34
15 verbose exit [ 34, true ]    

Thanks for the help, but still not quite working right..

root@SHARED1:/var/www/paperwork/paperwork/frontend#  npm install
npm WARN package.json @ No description                                                                                                                          
npm WARN package.json @ No repository field.                                                                                                                    
npm WARN package.json @ No README data                                                                                                                          
npm WARN package.json @ No license field.                                                                                                                       

root@SHARED1:/var/www/paperwork/paperwork/frontend# ls                                                                                                          
    app bootstrap composer.json deploy docker-runner.sh
    install.sh    package.json public vendor artisan  
    components composer.lock  Dockerfile  gulpfile.js
    node_modules phpunit.xml   server.php                                                        

root@SHARED1:/var/www/paperwork/paperwork/frontend# bower install --allow-root                                                                                  

May bower anonymously report usage statistics to improve the tool over time?
Yes
bower
no-home
HOME environment variable not set. User config will not be loaded.
bower
ENOENT
No bower.json present
Temple Pate
  • 173
  • 1
  • 2
  • 18

1 Answers1

0

Conceptual Overview

I'm not familiar with Paperwork, but as a general overview, here's what is probably going on:

Node.js is used for writing server-side Javascript, however, more generally it's used to run Javascript in an environment outside of the browser. Since this particular project seems to be using a PHP/nginx backend, Node is probably just being used for Javascript-based tools that build the frontend.

NPM is used to manage third-party packages in the Javascript world. Running npm install with no additional arguments will try to find a package.json file in the directory the command is run from. It will read a list of dependencies from that file and install them in a folder called node_modules.

Maybe a fix?

From the output you pasted above, it looks like you're running npm install from your /var/log/nginx folder. Since that directory doesn't have a package.json file, npm is confused and doesn't know what to install.

From those directions, the npm install -g gulp bower will do a global (the -g part) install of the gulp and bower tools.

The next step (npm install) is probably the one that's throwing you off. Somewhere you cloned git clone https://github.com/twostairs/paperwork.git. You'll need to cd into the paperwork directory and npm install from inside that folder.