I've install (fresh install) using nodejs and npm, then install sequelize-cli and module as per instruction on tutorial of sequelize http://docs.sequelizejs.com/manual/tutorial/migrations.html#installing-cli
But when wan't to do anything with sequelize, it return an error like below :
me@u64:~/project/manztihagi$ sequelize
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module 'sequelize'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/usr/lib/node_modules/sequelize-cli/lib/helpers/model-helper.js:7:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at /usr/lib/node_modules/sequelize-cli/lib/helpers/index.js:18:52
at Array.forEach (<anonymous>)
at Object.<anonymous> (/usr/lib/node_modules/sequelize-cli/lib/helpers/index.js:17:4)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/usr/lib/node_modules/sequelize-cli/lib/commands/init.js:7:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
me@u64:~/project/manztihagi$
Search another solution until reinstall the packages still not luck.
How to resolve this error ?
me@u64:~/project/manztihagi$ ng -v
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.1.3
Node: 10.9.0
OS: linux x64
Angular: undefined
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.7.3 (cli-only)
@angular-devkit/core 0.7.3 (cli-only)
@angular-devkit/schematics 0.7.3 (cli-only)
@schematics/angular 0.7.3 (cli-only)
@schematics/update 0.7.3 (cli-only)
rxjs 6.2.2
me@u64:~/project/manztihagi$ node -v
v10.9.0
me@u64:~/project/manztihagi$ npm -v
6.2.0
me@u64:~/project/manztihagi$