I have a CentOS 7 machine with mysql server and nginx. I installed nodejs with yum install nodejs and ghost-cli.
I wanted to install ghost with ghost-cli. but when I enter the ghost install commant I get this error:
✖ Checking system Node.js version
A SystemError occurred.
Message: The version of Ghost-CLI you are running was not installed with this version of Node.
This means there are likely two versions of Node running on your system, please ensure
that you are only running one global version of Node before continuing.
Debug Information:
Node Version: v6.11.1
Ghost-CLI Version: 1.1.0
Environment: production
Command: 'ghost install'
What's caused this error and how can I fix that? Thank you.
[Edited after Austin, the core contributor of Ghost-CLI, responded to
the issue]
I asked Austin, why he chose to not use local npm version?
He responded:
The reason for that is ghost creates a specific ghost user with which to run ghost. If you install nvm locally (e.g. in ~/.nvm), there is a very real (e.g. has happened several times) possibility that the created ghost user won't be able to run ghost because the home folder doesn't allow read permissions for everyone on the filesystem.
Going to close this issue for now - if more people have issues with this then we can reopen and figure out a better solution
Ok, so looks like you were able to resolve by running the installation as root but this is not something that I can do so I dug a little deeper into code that was pushed in the last couple of days to Ghost-CLI and my best guess is that this specific commit fix nvm -- ea30015 is causing the permission issue.
I have created an issue #447 with Ghost-CLI project to see if they can confirm it as well.
Related
Hey Im looking for a good and solid solution for how to install node + vuejs full stack web program in offline. Our customer can not have any internet access so we have to install it in offline but cant imagine how to do. First idea was copy all the code including node modules and just paste it to the customer’s computer and run it. However I do bot believe this is gonna work.
Customer uses Centos as fas as I know.
Thanks in advance.
Anyone who's looking for a 'how to' steps for offline centOS install.
Preparation
a laptop or Computer can access to the internet.
Install VM or whatever you want to use to set the whole project in CentOS
Install CentOS7 in your VM and connect to the internet.
!! Important!!
You MUST Follow your customer's centOS install options. There are many options you can select when you install your centOS. When you install your project in offline, you have to have all the packages(or dependencies) depends on OS installed options. If your customer installed CentOS as full development package, then you don't have to have additional dependencies. if not, you need a lot.
download all the packages you need as CentOS version. In my case, my web is based on 'Nodejs + Express', 'Vuejs + AntDesign', pm2, nginx so I have donwnloaded nodejs, nginx, and pm2. Others are gonna work without any problems once you've installed Nodejs. If you need some additional packages or dependencies(it will be written in the terminal message during installation process of node or others) then write down all the packages and install them.
Set your project in CentOS and test if it works(build the project if it's needed). If it does not work, check the path, dependencies, or anything else might be related(DO NOT FORGET LINUX AUTHORITY!!).
If everything works, then get all the installation file(.rpm) you've installed.
install another CentOS in VM as OFFLINE
install in offline CentOS .rpm installation files you get from online CentOS above.(no. 6) (DO Exactly same installation but this time, with only the files. not from the online repositories)
Test
If it's not working, check the path, root or user's authority in CentOS.
About PM2.
As PM2 is for the process management, you have to install it globally. However, sometimes(I tested 2 times in exactly same set environments. First try did work but second try didn't work. Couldn't find why. I've tested 4.3 and it works every time so I suggest you to get the pm2 version under 4.5) pm2 v.4.5 or up does not support offline installation with npm so All you have to do in online centos:
npm pack pm2(whatever you've set the name when you installed pm2 in online centos, if you didn't change the package name then npm pack pm2 will work, command path doesn't matter. pm2 is installed globally so when you run npm pack pm2 anywhere it will take global installed pm2 whatsoever) This will pack all the dependencies to install pm2 in offline. Take this packed file(.tgz) and install this in offline.
Test
If it's not working and you couldn't find the reason why, leave a comment or answers down below. I will try to help as much as I can.(I'm Korean and live in Korea. Please be aware of time difference)
When I try to create the starter React tutorial app using powershell, I get the below error:
"You are using npm 2.15.12 so the project will be boostrapped with an old unsupported version of tools".
"Please update to npm 3 or higher for a better, fully supported experience".
However, my NPM version is 6.11.3 as seen below.
What I have tried:
I have ran powershell as admin as answered in this question and restart.
I have also uninstalled and reinstalled Nodejs completely.
So after an extra hour digging around, I saw a few posts with similar (but not exactly) the same issue. I decided to install Yarn and install with that.
After install, I ran yarn cache clean and ran npx create-react-app your-app and it worked. Sorry for bothering you all.
I had the same problem. I'm running WSL with ubuntu, and yarn cache clear didn't work, but I noticed a node modules directory created in the project. I think it was messing with the node version so I deleted it. It worked
I can't get a version of the Breeze Zza sample application to work (with Node, Express, Mongodb). I've tried running the provided sample, as well as digging out a later version from github but so far no joy.
The Zza version provided from the page http://www.breezejs.com/samples/zza (follow the link "Download the Sample") is non-functional. At first, it fails with an error indicating that express no longer has a configure() method and after fixing that, it then struggles with invalid middleware requests like express.favicon().
This is due to the instructions (and the package.json) now causing Express 4.x to be installed instead of Express 3.x since the build requests the latest version by default.
I wonder if the link ought to be updated to point instead to a Zip derived from github, where the package.json explicitly pins the Express version to 3.x ... https://github.com/IdeaBlade/Breeze/tree/90c2bbb4b0722c3bb99931940f809844f9c87042/Samples_Unpublished/Zza/Zza.ExpressServer
Anyone know how I should get a working version of the sample app?
For Debian Wheezy, with access to Jessie packages I did the following to install and configure the sample from the Zza.ExpressServer folder provided in github, but I still have a problem, with the server, once launched, reporting "Cannot get /". Still it's progress compared to no server launching at all.
Install nodejs nodejs-legacy, npm and mongodb (I do this by having apt-pinned jessie repositories), but there's many ways to do it. Go to a suitable working directory and put Zza.ExpressServer there...
cd Zza.ExpressServer
npm install
npm install mongodb # this seems to have been forgotten in the new package.json
sudo service mongodb stop
sudo unzip data/ZzaMongoDb.zip -d /var/lib/mongodb
sudo chown mongodb:nogroup /var/lib/mongodb/zza.*
sudo service mongodb start
node server
I'm setting up a Vagrant environment for a client with some legacy dependencies that require Node.js v0.4.12. I know I can install it via nvm, but that's provisioning the box with NVM and starting the node app is proving...problematic. In a perfect world, I'd be able to install old versions via apt (apt-get install nodejs=0.4.12), but that doesn't seem to be an option. I can't find a single PPA that retains old versions.
I know I can pull and compile from source (that's where I'll go if I have to), but I'm wondering whether there are any other options I just haven't found. I also need npm.
For whatever it's worth, I ended up installing with nvm. There are still some minor issues to resolve like existing the provision script cleanly, but Node gets installed and started successfully so I guess that's the answer. At least for now.
I'm trying to install socket.io on my machine, but I keep encountering errors when I run npm install socket.io as directed on their website. I'm not sure if I have version incompatibilities for npm or node.js or if I'm simply missing something obvious. As far as I can tell, I have the most recent stable version of both of them.
When I run the install command, the console outputs 40+ errors, and at the end I am given the line npm not ok. Any ideas as to what is going wrong?
What is the error?
Are you installing npm using code from git? I can only guess that you are not using a stable code, because the master branch from git is often unstable.
If that is the case, what you can do is to get the latest code from the git repository and install it again.
$ cd npm
$ git pull
$ make install
Hope it will solved your problem.
You need to provide an error log if you want anyone to try and troubleshoot your problem. It would also be helpful to know whether you installed Node and NPM from source or RPM. Furthermore, if you installed from source, did you do a standard install or did you make customisations?
If you are able to start from scratch, I suggest following the steps below and seeing how you go. Installing into your home directory won't require root and it makes it easier to clear everything out if you need to start again.
Install the stable release of Node in your home directory (use ./configure --prefix=~/Node/)
Set your path as appropriate (ie. PATH=/home/user/Node/bin:$PATH)
Run the standard NPM installer (curl http://npmjs.org/install.sh | sh)