Issue running migration.js file in x-press

Working on the x-press publishing project and I’m getting this error when i try to run the migration.js file (step 17), even though i know i required sqlite3 and its in my package.json file.

throw err;

Error: Cannot find module ‘sqlite3’
Require stack:

  • /Users/****/Codecademy/xpress-publishing/migration.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/Users//Codecademy/xpress-publishing/migration.js:1:17)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions…js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [ '/Users/
    /Codecademy/xpress-publishing/migration.js’ ]

Seems to be that the sqlite3 node modules are not installing correctly. On another thread some codecademy users have started, it seems that the npm install sqlite3 doesn’t work with certain versions of node.js and requires the installation of an node version manager. There was nothing about this in the walkthrough video. Any thoughts?

Try this:

Good luck!

Hello man, I have the same problem, have you fixed it?