Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find types for node error when running npm run watch:build #247

Open
sambhavaggarwal opened this issue Oct 4, 2020 · 2 comments
Open

Comments

@sambhavaggarwal
Copy link

  • I'm submitting a ...
    [x] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    I ran into this issue when creating a new NodeJS project using typescript-starter. I chose yarn as my package manager (I don't know if this had any influence in causing the error) and when I tried to run yarn run watch:build I got a compile error saying that the type for node could not be found. I tried to use npm run watch:build as well, and that too failed.

  • Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
    I was able to find a solution at https://stackoverflow.com/questions/43542710/buildcannot-find-type-definition-file-for-node. It required running npm install @types/node --save-dev

I hope this is of use to future devs who run into this issue.

@evert-arias
Copy link

I had the same issue. Thanks for sharing the solution. 👍

@giannoug
Copy link

giannoug commented Mar 13, 2021

Got this today too, some more information in case it helps:

node -v
v14.16.0
yarn -v
1.22.10

Fixed with yarn add -D @types/node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants