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
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.

  • Thanks for the help, but still not quite working right.. – Temple Pate May 26 '15 at 18:23
  • There should be a bower.json file in that frontend folder, but bower is claiming it can't find it (and I don't see it in your ls). It's definitely there in the repository though... – Michael Martin-Smucker May 26 '15 at 20:51
  • Well then, time to start from scratch :D – Temple Pate May 28 '15 at 11:21
  • I now have error : [RuntimeException] The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly – Temple Pate May 28 '15 at 11:58
  • 1
    It's weird that HOME isn't set. When you run $HOME in terminal, does it say anything? However, here's the documentation on the default COMPOSER_HOME env variable, and there are lots of guides on the internet for setting variables in bash. – Michael Martin-Smucker Jun 8 '15 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.