Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
97 views

I would like to use lightweight-charts library with ES module. I would like to use lightweight-charts on browser so I followed instruction of the document https://tradingview.github.io/lightweight-...
3 votes
1 answer
66 views

In NodeJS: // module.js export const b = 1 export const a = 2 // index.js import * as ns from './module.js' console.log(Object.keys(ns)) // [a, b] I cannot find why it is not the same as the export ...
0 votes
0 answers
33 views

In a single TypeScript file, how can I get the path to the current file's directory in such a way that is compatible with both CommonJS and ESModules? In CommonJS, the following works: const dir = ...
0 votes
0 answers
56 views

I am getting this error "ReferenceError: exports is not defined in ES module scope" while deploying my backend to render.com I just have two typescript files which when compiled creates two ....
0 votes
2 answers
663 views

I want to figure out how the ESM module finds dependencies in nodejs. For example, I have an test.mjs file import value from 'test-a' console.log(value) 'test-a' It is a nodeModule dependency ...
1 vote
0 answers
414 views

Im running React+Vite. And im trying to setup unit test cases for components, but when I try to run it, I'm getting the following error Error: require() of ES module ...\index.js from ...\...
0 votes
1 answer
223 views

I am using Node v22.12.0 with Jest. I am trying to import a library that works find on my other typescript projects (with NestJS) and I get the following error. SyntaxError: Unexpected token 'export' ...
2 votes
2 answers
80 views

I have a NestJS application with some commands attached to it. When I run the application I can import path as import path from 'path'; and it will work fine. When I use nest-command to run a CLI ...
1 vote
1 answer
475 views

chai latest version 5.1.2 move to ESModule. Is it possible continue use it in CommonJS file? chai is just a dev dependency in my project, used for unit test. I don't want to upgrade my modules to ...
-1 votes
1 answer
1k views

having a node js basic project setup with package.json , install a package and try to use both require and import statment in the same file; to do that here is what did so far but not working. First ...
2 votes
0 answers
85 views

I saved the following code as index.cjs so that node considers it as a CommonJS module. console.log(this); function getThis() { console.log("this", this); } getThis.call(null); getThis....
0 votes
1 answer
152 views

✘ [ERROR] Could not resolve "https" node_modules/@ng-apimock/cypress-plugin/dist/cypress.plugin.js:4:22: 4 │ const https = require("https"); ╵ ~~~~~~~ ...
0 votes
2 answers
979 views

I'm trying to mock the import.meta.url property in a Jest setup file within a TypeScript project using the NodeNext module system. My project is configured with "module": "NodeNext"...
1 vote
1 answer
819 views

I have created npm package in order to use it withing our organization. It containing some reusable code for testing. It is published to our internal feed and i have installed in destination project ...
1 vote
1 answer
109 views

Recently I came across an eslint warning in my project about a circular dependency. I previously thought circular references are impossible in ES modules. But apparently they work in some situations. ...

15 30 50 per page
1
2 3 4 5 6

AltStyle によって変換されたページ (->オリジナル) /