tareksander / IF-Framework

1 stars 0 forks source link

[Bug]: Ran into some bugs after getting the IF-Framework-Template to run #1

Open arunk opened 1 day ago

arunk commented 1 day ago

Hi, you have an interesting project, but unfortunately I have run into some problems. There were a few fixes I had to do to get your project to run on my Linux machine. I will create a pull request with the fixes. But when I finally got the project to run with npm run serve I get a blank page and when I check the console I see the following error:

TypeError: _if_framework_framework_choice__WEBPACK_IMPORTED_MODULE_1__.engine.initHistory is not a function
    init index.ts:19

When I look into it, it is not able to resolve engine, because it looks like there is no choice folder within node_modules/@if-framework/framework/. I had to install the @if-framework/framework from git rather than npm because the npm package doesn't seem to be current. It is missing the service.ts file. But even installing it from git seems to not install the proper files.

tareksander commented 1 day ago

What kind of fixes have you tried? I'm running Debian stable myself, so I only tested it on Linux.

arunk commented 1 day ago

Well for @if-framework/cli I had to modify the cli iff script to add #!/usr/bin/env node at the top, since it didn't have it and was erroring out. I'm running Ubuntu btw. Then when I tried to compile the project I got an error about service.ts being missing. And sure enough when I looked at node_modules/@if-framework/framework there was no service.ts. So I installed the @if-framework/framework from the github repository rather than npm. That fixed the service.ts issue, but this is the final issue I have come to. I'm not sure how to fix this issue.

tareksander commented 1 day ago

I just looked, I changed the API in the meantime, there is not initHistory anymore, just init, which gets the passages and the game version number as parameters.

arunk commented 1 day ago

have you pushed the changes to the repository? I don't see any recent commits

tareksander commented 1 day ago

Yep, that's pushed.

arunk commented 1 day ago

to this repository? i only see one main branch and the last commit was 5 months ago

tareksander commented 1 day ago

I mean you can look at the engine.ts file in the repo yourself if you don't believe me.

arunk commented 1 day ago

Sorry I didn't understand. So this was changes you made a while ago, but the template repo is still using the older call to initHistory, so I need to change my call in src/index.ts to engine.init(new History(...), version) ?

arunk commented 1 day ago

Ok that fixed it. Oh one other thing I had to install in the template was marked npm library. Would you like me to make a pull request to your template repo with these changes?

tareksander commented 1 day ago

Weird, I have marked in the framework dependencies, the application itself shouldn't need to specify it.