modood / Administrative-divisions-of-China

中华人民共和国行政区划:省级(省份)、 地级(城市)、 县级(区县)、 乡级(乡镇街道)、 村级(村委会居委会) ,中国省市区镇村二级三级四级五级联动地址数据。
Do What The F*ck You Want To Public License
18.66k stars 7.05k forks source link

在windows环境中,即使装了sqlite3的包,仍报“Error: Please install sqlite3 package manually”的错误 #97

Closed pan102887 closed 2 years ago

pan102887 commented 3 years ago

环境

china-division@2.3.1 C:\Source\work\Administrative-divisions-of-China +-- bufferhelper@0.2.1 +-- eslint-config-standard@10.2.1 +-- eslint-plugin-import@2.23.3 +-- eslint-plugin-node@5.2.1 +-- eslint-plugin-promise@3.8.0 +-- eslint-plugin-standard@3.1.0 +-- eslint@4.19.1 +-- html-minifier@3.5.21 +-- husky@0.13.4 +-- iconv-lite@0.4.24 +-- lodash@4.17.21 +-- mocha@7.2.0 +-- sequelize-cursor-pagination@1.7.0 +-- sequelize@5.22.4 `-- sqlite3@4.2.0

## 报错信息
```bash
    npm run fetch

> china-division@2.3.1 fetch
> node lib/fetch.js

C:\Source\work\Administrative-divisions-of-China\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:88
        throw new Error(`Please install ${moduleName} package manually`);
        ^

Error: Please install sqlite3 package manually
    at ConnectionManager._loadDialectModule (C:\Source\work\Administrative-divisions-of-China\node_modules\sequelize\lib\dialects\abstract\connection-manager.js:88:15)
    at new ConnectionManager (C:\Source\work\Administrative-divisions-of-China\node_modules\sequelize\lib\dialects\sqlite\connection-manager.js:22:21)
    at new SqliteDialect (C:\Source\work\Administrative-divisions-of-China\node_modules\sequelize\lib\dialects\sqlite\index.js:14:30)
    at new Sequelize (C:\Source\work\Administrative-divisions-of-China\node_modules\sequelize\lib\sequelize.js:334:20)
    at Object.<anonymous> (C:\Source\work\Administrative-divisions-of-China\lib\sqlite.js:8:19)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Source\work\Administrative-divisions-of-China\lib\fetch.js:1:16)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
modood commented 2 years ago

根据提示安装 sqlite3 即可。(PS:本项目完全在 Linux 环境下开发,未在 Windows 上验证过。)