infinitered / gluegun

A delightful toolkit for building TypeScript-powered command-line apps.
MIT License
2.95k stars 147 forks source link

Type Errors #715

Open kevinvangelder opened 4 years ago

kevinvangelder commented 4 years ago

Using gluegun 4.2.0 I get the following errors trying to build my project:

node_modules/gluegun/build/types/toolbox/filesystem-types.d.ts:40:36 - error TS2694: Namespace 'path' has no exported member 'resolve'.
40     resolve: typeof import('path').resolve;
                                      ~~~~~~~
node_modules/gluegun/build/types/toolbox/prompt-enquirer-types.d.ts:70:34 - error TS2689: Cannot extend an interface 'NodeJS.EventEmitter'. Did you mean 'implements'?
70 declare class BasePrompt extends NodeJS.EventEmitter {
                                    ~~~~~~
node_modules/gluegun/build/types/toolbox/prompt-enquirer-types.d.ts:75:44 - error TS2689: Cannot extend an interface 'NodeJS.EventEmitter'. Did you mean 'implements'?
75 declare class Enquirer<T = object> extends NodeJS.EventEmitter {
                                              ~~~~~~
eugeneduvenage commented 4 years ago

I ran across this same issue recently, it turned out to be a simple typings mismatch, I was running the lts node series v12.16.1 but I had installed @node/types from the 13.x.x series. I updated my package.json to specify version 12.12.30 of @types/node and the problem went away.

jamonholmgren commented 3 years ago

Thanks @eugeneduvenage , just ran into this myself.

kyleect commented 3 years ago

I'm currently running in to this same issue. Versions:

I tried using node 14.14.0 thinking there was a types version mismatch but same error.

mmNalaka commented 3 years ago

@kyleect I had the same issue when using "@types/node": "^14.x.x". Changing the @types/node version to "@types/node": "^12.7.11" resolved the issue.

vincent-thomas commented 2 years ago

I also have a typeerror but i dont know how to solve it:


    throw up;
    ^

TypeError: _b.apply is not a function
    at C:\Coding_and_Tools\v-thomas\passwrdmngr-new\build\extensions\mainMenu.js:53:47
    at step (C:\Coding_and_Tools\v-thomas\passwrdmngr-new\build\extensions\mainMenu.js:33:23)
    at Object.next (C:\Coding_and_Tools\v-thomas\passwrdmngr-new\build\extensions\mainMenu.js:14:53)
    at fulfilled (C:\Coding_and_Tools\v-thomas\passwrdmngr-new\build\extensions\mainMenu.js:5:58)```
Im using prisma but i know thats not the problem. I think its to do with gluegun. Can anybody help me?