---
title: "Discussion on \"How To Use An ES6 Import In Node.js\" | Hashnode"
description: "Discussion on \"How To Use An ES6 Import In Node.js\". To handle this issue, we use ES6 import\nBy changing content of package.json file\n//package.json\n\n{\n    \"name\": \"index\",\n    \"version\": \"1.0.0\",\n    \"description\": \"\",\n    \"main\": \"index.js\",\n    \"type\": \"module\",\n    \"scripts\": {\n        \"test\": \"ech..."
url: "https://hashnode.com/posts/how-to-use-an-es6-import-in-nodejs/67aed648fa49a6b674ccafd0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Use An ES6 Import In Node.js](https://ultimatenode.hashnode.dev/how-to-use-an-es6-import-in-nodejs?utm_source=hashnode&utm_medium=feed)

To handle this issue, we use ES6 import By changing content of package.json file //package.json { "name": "index", "version": "1.0.0", "description": "", "main": "index.js", "type": "module", "scripts": { "test": "ech...

Feb 14, 2025 · 1 min read · ultimatenode.hashnode.dev  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#import](https://hashnode.com/tag/import)

## Written by

[Mohit Vishwakarma](https://hashnode.com/@mohitv02)

@mohitv02

  
[View profile](https://hashnode.com/@mohitv02)

developer loading...

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
