New to ghost, and new to NodeJS, but couldn't resist trying to set Ghost up.
Goal: Get a new ghost instance up and running on Azure from source.
I followed Scott Hanselman's Post and Jeremiah Billmann's Post to attempt this.
I did the following:
npm install
grunt init
grunt prod
server.js
file in the root directory that contained var GhostServer = require('./index');
config.example.js
to config.js
and edited its properties
iisnode.yml
file to have it output full errors The full error I see is:
TypeError: Cannot read property '__cid' of undefined
at Runner_SQLite3.<anonymous>
Screenshot of the full error is below:
Any idea where I went wrong on this? The nature of the error message makes me suspect it's not me, but given that I'm new to this I could be completely wrong.
I've had a very similar problem with a fresh upgrade on a standard linux box. It seems like sqlite3 chokes on a non-existing path for its database.
Try that:
Make sure that the /content/data
directory exists (or whatever path you have set in your config file for the ghost-dev.db
file). If not, create it.
Normally, this should do the trick. If not, then maybe you need to force migrations via step 2 below.
Try running :
FORCE_MIGRATION=true npm start
Ghost (0.5.3) includes, in config.js, the following path by default:
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost-dev.db')
},
debug: false
},
Run the following series of commands, from the root directory of Ghost, to create the file path and file sqlite3 requires:
cd content
mkdir data
cd data
touch ghost-dev.db
../../
npm start
FYI: this can happen if the following line is included in your .gitignore file
/content/data/*
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.