luin / wechat-export

📃 Export WeChat chat histories to HTML files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot find module 'output/{uid}/message.json'

fr0der1c opened this issue · comments

I followed the instruction in README and got the following message:

> node index.js bkup/Documents/{uid} output/
✅ Got 4 message files from bkup/Documents/{uid}/DB
node:internal/modules/cjs/loader:939
  const err = new Error(message);
              ^

Error: Cannot find module 'output/246axxxxxxxxxxxxxxxxxxxxf11947/message.json'
Require stack:
- /Users/admin/Downloads/wechat-export-main/utils/generateHTMLFromJSON.js
- /Users/admin/Downloads/wechat-export-main/utils/parseMessages.js
- /Users/admin/Downloads/wechat-export-main/utils/parseDatabase.js
- /Users/admin/Downloads/wechat-export-main/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:939:15)
    at Module._load (node:internal/modules/cjs/loader:780:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at generateHTMLFromJSON (/Users/admin/Downloads/wechat-export-main/utils/generateHTMLFromJSON.js:12:16)
    at parseMessages (/Users/admin/Downloads/wechat-export-main/utils/parseMessages.js:157:9)
    at async map.concurrency (/Users/admin/Downloads/wechat-export-main/utils/parseDatabase.js:25:7)
    at async /Users/admin/Downloads/wechat-export-main/node_modules/p-map/index.js:57:22 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/admin/Downloads/wechat-export-main/utils/generateHTMLFromJSON.js',
    '/Users/admin/Downloads/wechat-export-main/utils/parseMessages.js',
    '/Users/admin/Downloads/wechat-export-main/utils/parseDatabase.js',
    '/Users/admin/Downloads/wechat-export-main/index.js'
  ]
}

Node.js v18.2.0

Any idea?