I solved this with this approach:-When You are using Es6 import/export functionality with node, you need to import modules with ".mjs" extensionand before importing rename your module ./path-to/app.js to ./path-to/app.mjs. Promise based HTTP client for the browser and node.js - GitHub - axios/axios: Promise based HTTP client for the browser and node.js ArrayBufferView, URLSearchParams // - Browser only: FormData, File, Blob // - Node only: Stream, Buffer, FormData (form-data package) axios depends on a native ES6 Promise implementation to be supported. Any other support files (e.g. I have a .ts file in node js (latest version of node.js for 07.10.19) app with importing node-module without default export. There are 3555 other projects in the npm registry using bcrypt. To use a function, you must define Instead of: import {version } from './package.json'; console. Depending on your settings, webpack will under the hood resolve to one of the following: dist/bson.browser.esm.js If your project is in the browser and using ES6 modules (Default for webworker and web targets); dist/bson.browser.umd.js If your project is in the browser and not using ES6 modules; dist/bson.esm.js If your project is in Node.js and using ES6 modules file.js. This is the same heuristic that Webpack uses. I faced the same import and initialization problem while working on NestJ/Express. Disclaimer: I'm not sure what the requirement is for having your file extension as jsx vs js for your components. Older versions of typescript are incompatible with @tsconfig/node16.In those cases we will use an older default configuration. This works pretty well in most cases. Template literals are enclosed by backtick (`) characters instead of double or single quotes.Along with having normal strings, template literals can also contain other parts called placeholders, which are embedded expressions delimited by a dollar sign and curly braces: ${expression}.The strings and placeholders get passed to a function either a default function, or a function you supply. Node has experimental support for ES modules. When run it will call (demo.script/main ) function on startup. if you are using old version of node.js you may need to install es6-shim: npm install es6-shim --save. import myJson from "jsonlocation"; Before following the steps make sure that Node is installed. and change your code to this Inside your package.json file, create a "babel" object and put this setting. It just occurred to me, when you say "in ES6" you actually mean "in TS" -- I thought you were talking about the code emitted by tsc but that's not actually what's happening. A function in JavaScript is similar to a procedurea set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. Matching file extensions: I importing a file named Todo.jsx in the root as ./src/Todo/. A bcrypt library for NodeJS.. Latest version: 5.1.0, last published: 25 days ago. This section assumes some basic knowledge about modules. Create server.js file; so visit your app root directory and create a new file name server.js. 2- Install ts-node npm i -g ts-node. Le code JavaScript est interprt ou compil la vole (JIT). my file name is "example.json" {"example" : "my text"} the example key inside the example.json can be anything just keep in mind to use double quotes to prevent future issues. I'm trying to run ES6 modules natively on the browser (