Cannot find type definition file for 'node'

I was making my app as usual, but then, after an ionic run android, whitout touching anything weird, just modifying an .ts file from a page, this error appeared.

As I said, i didnt touch anything…

What can i do to solve it?

Thanks!

You usually don’t run the app in a node context, so you should use file plugins from ionic-native for use cases with files.

If you are in a node context, then you have to install type definitions for node.
npm install --save-dev @types/node

Thank you, that solved the problem.

Hi @Mystearica

Please check your package.json file for the duplication of module
or
Remove node_module and try to reinstall npm install

Thanks

Here is a plugin for working with files on ios or android: