Closed christopherwk210 closed 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?
My exact steps and results from the start:
The tsconfig.json error:
I also should mention that I'm developing on a Mac, however I don't think that will have any impact on this.
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:
minecraft-scripting-types
from package.json
npm i -D minecraft-scripting-types-server
npm i -D minecraft-scripting-types-client
"types": ["minecraft-scripting-types"]
from tsconfig.json
/// <reference types="minecraft-scripting-types-server" />
to your server files/// <reference types="minecraft-scripting-types-client" />
to your client files Sure thing. I'm a little surprised I didn't pick up on this while I was doing my tutorial videos.
Oh, of course I didn't pick it up, I was using JavaScript, not TypeScript derp.
Anyway, fixed now in 0.1.3.
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:
I believe a version key has to be added to package.json to remedy this.