minecraft-addon-tools / minecraft-scripting-types

TypeScript typings for the Minecraft Scripting API
Other
44 stars 3 forks source link

NPM installation directly from GitHub doesn't work due to missing version type #3

Closed christopherwk210 closed 5 years ago

christopherwk210 commented 5 years ago

When using the yo generator I chose TypeScript as my language of choice. Loading up the tsconfig.json and any of the generated .ts files shows an error due to missing types. The package was not found in node_modules, and trying to install it manually shows this error:

screen shot 2018-12-11 at 6 25 05 am

I believe a version key has to be added to package.json to remedy this.

abc-55 commented 5 years ago

Installing from GitHub is no longer possible because we have split the types into multiple packages and use lerna to manage them. To install the types manually use minecraft-scripting-types-server and/or minecraft-scripting-types-client from npm, e.g. npm i minecraft-scripting-types-server.

The genrator should however setup and install everything correctly. Can you provide more information about the errors? What options did you choose when running the generator? What was the content of package.json after running the generator?

christopherwk210 commented 5 years ago

My exact steps and results from the start: screen shot 2018-12-11 at 8 37 30 am

screen shot 2018-12-11 at 8 37 38 am

The tsconfig.json error: screen shot 2018-12-11 at 8 39 23 am

christopherwk210 commented 5 years ago

I also should mention that I'm developing on a Mac, however I don't think that will have any impact on this.

abc-55 commented 5 years ago

The reason for the error is that the generator is not yet updated to work with some changes in this repo. @AtomicBlom can you look into this?

As a workaround, you can:

AtomicBlom commented 5 years ago

Sure thing. I'm a little surprised I didn't pick up on this while I was doing my tutorial videos.

AtomicBlom commented 5 years ago

Oh, of course I didn't pick it up, I was using JavaScript, not TypeScript derp.

Anyway, fixed now in 0.1.3.