Closed Pnlvfx closed 3 weeks ago
Typescript tell you to use nodemon.default, but then when starting nodemon, node will throw an error as nodemon.default is not a function, so there is something wrong between types and export
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3
type: 'module' devDependency: { "nodemon": "^3.1.4", }
nodemon({
script: './dist/server.js',
ext: 'js',
exec: NGROK_URL=${url} node
,
})
This expression is not callable. Type 'typeof import("/Users/simo97/Desktop/web/node_modules/nodemon/index")' has no call signatures.ts(2349)
I don't know what that means. Can you provide a git repo to help understand and replicate (note that I don't generally use typescript so assume you'll have to be clear in your instructions)
I understand, it's the same for me when I look at your project, I start coding using typescript and I never used module exports and stuff like that, so I really don't know how to help you, however, I think you know the difference between commonjs and esmodule.
import statements of .js files are treated as ES modules if the nearest parent package.json contains "type": "module".
Importing nodemon with type: module in a package.json will throw a typescript import error.
This expression is not callable. Type 'typeof import("/Users/simo97/Desktop/web/sports/api-jupiter/node_modules/nodemon/index")' has no call signatures.ts(2349)
I've seen that in the latest versions (I don't remember exactly which one) you include the @types in the repository, I strongly think that the error arises for that, however I'm not sure.
I'm sorry but I have no time to provide a repro, however you can just create a new typescript project and use type: module on your package.json and the error will appear.
I don't know what that means. Can you provide a git repo to help understand and replicate (note that I don't generally use typescript so assume you'll have to be clear in your instructions)
Sorry, but I have just seen that there is a pull request that address this issue,
I've just merged that pr. Since it was provided by someone else it didn't come with tests, so I can't be entirely sure it does what helps you, but hopefully it does the trick.
I've just merged that pr. Since it was provided by someone else it didn't come with tests, so I can't be entirely sure it does what helps you, but hopefully it does the trick.
I'l try it now and let you know if it does.
I've just merged that pr. Since it was provided by someone else it didn't come with tests, so I can't be entirely sure it does what helps you, but hopefully it does the trick.
Yes, it does fix the issue.
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3
Automatically closing this issue due to lack of activity
This expression is not callable. Type 'typeof import("/Users/simo97/Desktop/web/tiktok-downloader/node_modules/nodemon/index")' has no call signatures.ts(2349)
I'm using latest version but it happeng from 3.1.0, as no one has reported it before, I will do it.