Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 4
    when using type module you have to do it like: import database from './database.js' don't forget .js Commented Oct 20, 2020 at 22:01
  • Do you mean 'database/index.js'? it doesn't work. Commented Oct 20, 2020 at 22:04
  • I mean when importing make sure you add .js at the end of import like import database from './database.js' or you can use ems module and in your package.json just do nodemon -r esm main.js Commented Oct 20, 2020 at 22:14
  • 1
    @webcoder database.js doesn't exist so that doesn't make sense. Commented Oct 22, 2022 at 17:52