BobyB
Denoβ€’2y agoβ€’
10 replies
Boby

'React' refers to a UMD global, but the current file is a module.

I am using Deno with the GitHub Actions, and my linting is getting passed but I don't know what is happening when Deno trying to run tests
I am getting an error
Check file:///home/runner/work/react-todo/react-todo/__tests__/page.test.tsx
error: TS2686 [ERROR]: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.
  render(<Home />)
          ~~~~
    at file:///home/runner/work/react-todo/react-todo/__tests__/page.test.tsx:7:11

I tried explictliy adding import _React from 'react'; but that too didn't work out.

https://github.com/Boby900/react-todo

Any help would be greatly admire.
Screenshot_564.png
GitHub
Contribute to Boby900/react-todo development by creating an account on GitHub.
GitHub - Boby900/react-todo
Was this page helpful?