Today the reference version of Node.js for Cozy installation changes from 0.8.20 to 0.10.26. All images available on the Cozy.io website and the installation script are now based on the 0.10.26 version.
Current version of the Cozy stack is incompatible with Node.js 0.8. All applications remain compatible with the 0.8 version of Node.js.
See below for information about how to update your existing installation.
Why we change the reference Node.js version of Cozy
We experienced many problems with the Node Package Manager due to the fact that the 0.8 version of Node.js was not well supported by the NPM maintainers. We didn’t wait for the next major release (0.12) because it would have require to wait for several minor releases to reach a new stable version. That’s why we decided to move the reference version of Node.js for Cozy to 0.10.26.
How to update your existing installation
You can update your existing installation by using the installation script this way:
sudo apt-get install python python-pip python-dev sudo pip install fabric fabtools wget https://raw.github.com/mycozycloud/cozy-setup/master/fabfile.py fab -H sudoer@ip upgrade_to_node10
Or by running the following commands manually on your system as sudoer:
# Upgrade Node.js wget http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz tar -xvzf node-v0.10.26.tar.gz cd node-v0.10.26 ./configure make make install # Ensure that installation succeeded node -v # should return 0.10.26 # Update Cozy apps npm install cozy-monitor -g rm -rf /usr/local/cozy/apps/*/*/*/node_modules cozy-monitor update-all cozy-monitor update-cozy-stack # Update Cozy Controller npm install cozy-controller -g supervisorctl restart cozy-controller # You're done!
Update Node.js on the Raspberry Pi installation
Rapsberry Pi images requires a different way to update the Node.js version. Here it is:
# Download sources wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-arm-pi.tar.gz tar -xzvf node-v0.10.26-linux-arm-pi.tar.gz # Copy them rm -rf /opt/node mkdir /opt/node mv node-v0.10.26-linux-arm-pi/* /opt/node # Add link to executables to make them accessible from anywhere. ln -s /usr/local/bin/node /opt/node/bin/node ln -s /usr/bin/node /opt/node/bin/node ln -s /usr/local/bin/npm /opt/npm/bin/npm ln -s /usr/bin/npm /opt/npm/bin/npm # Ensure that installation succeeded node -v # should return 0.10.26