Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"testData.forEach is not a function" #5

Closed
tiengtinh opened this issue Jul 31, 2018 · 1 comment
Closed

"testData.forEach is not a function" #5

tiengtinh opened this issue Jul 31, 2018 · 1 comment

Comments

@tiengtinh
Copy link

Hi,

I got this error while trying to run the bot

2018-07-31 11:44:07 - info: Initializing database: Creating collections on first start
2018-07-31 11:44:08 - warn: Uncaught Exception
2018-07-31 11:44:08 - warn:  {"message":"testData.forEach is not a function","stack":"TypeError: testData.forEach is not a function\n    at utils.test.readData (/home/tinh/workspace/projects/blockchain/WolfBot/node_modules/@ekliptor/bit-models/models/serverConfig.ts:395:26)\n    at ReadFileContext.fs.readFile [as callback] (/home/tinh/workspace/projects/blockchain/WolfBot/node_modules/@ekliptor/apputils/test.ts:6:20)\n    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:437:13)"}
2018-07-31 11:44:08 - warn: TypeError: testData.forEach is not a function
    at utils.test.readData (/home/tinh/workspace/projects/blockchain/WolfBot/node_modules/@ekliptor/bit-models/models/serverConfig.ts:395:26)
    at ReadFileContext.fs.readFile [as callback] (/home/tinh/workspace/projects/blockchain/WolfBot/node_modules/@ekliptor/apputils/test.ts:6:20)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:437:13)

It seems this file https://github.com/Ekliptor/bit-models/blob/master/models/serverConfig.ts#L392 expect the file serverConfig.json which I can't find anywhere

@tiengtinh tiengtinh changed the title testData.forEach is not a function trying to run the bot "testData.forEach is not a function" trying to run the bot Jul 31, 2018
@tiengtinh tiengtinh changed the title "testData.forEach is not a function" trying to run the bot "testData.forEach is not a function" Jul 31, 2018
@Ekliptor
Copy link
Owner

Ekliptor commented Aug 7, 2018

That is an error from my database module package: https://github.com/Ekliptor/bit-models
Although I can not reproduce it. Do you have the folder models/data/test? in bit-models?
Luckily this data is not really needed. So I just uploaded a new version with a fix for this.
Please ensure you have bit-models version 1.0.35 and install the bot again with an empty database.

Update: That file really wasn't part of the NPM version of the module. As you already said you can't find it;) Luckily not needed, so updating will fix it.

@Ekliptor Ekliptor closed this as completed Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants