Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
86 views

Is it possible to create a single-page website hosted on static hosting (no custom headers etc.) that uses ES modules in external .js files and still can be saved as "Website, complete" in ...
mihi's user avatar
  • 6,761
0 votes
0 answers
95 views

I have been using a new package.json entry points using exports. TypeScript works very well without any problems. So far, I have used it in a monorepo for a backend application where all files are .ts ...
Harshal Patil's user avatar
-2 votes
2 answers
87 views

Problem I have a React app using Leaflet.js (v.1.9.0) and I host it in Vercel. Building works OK, but when visiting my app online logs this message in console: Uncaught ReferenceError: require is not ...
LoukasPap's user avatar
  • 1,348
3 votes
0 answers
71 views

Im trying to configure an unit test for my website with Jest and I can't get it to work correctly. I've tried some of the solutions suggested by the ts-jest documentation but it still hasn't worked. ...
Samuel Augusto's user avatar
0 votes
1 answer
58 views

I'm getting the error message below for my service worker which starts with import statements. The registation of the service worker is as a module, so it should work as far as I know? Service Worker ...
Simon Ferndriger's user avatar
1 vote
1 answer
93 views

On a webpage, I am not using Node.js. I wanted to use p-limit like this: <script src=" https://cdn.jsdelivr.net/npm/[email protected]/index.min.js "></script> But this doesn't work. ...
Flo's user avatar
  • 485
-3 votes
1 answer
79 views

Since I'm having a bug that I can't figure out, a cold doubt has assailed me:. I have the below code in a Svelte 5 SvelteKit app. And I'm importing import { queryClient } from './src/query.ts from ...
Fred Hors's user avatar
  • 4,273
0 votes
1 answer
32 views

I have a package that uses fields like this to hide the inclusion of node.js fs fields from the browser { "name": "mypackage", "version": "1.0.0", "...
Colin D's user avatar
  • 3,199
2 votes
0 answers
30 views

I wanted to use Sugar's Date module for some NLP parsing and so I installed sugar-date only because I only need the date: yarn install sugar-date But I got the error: error TS2306: File 'node_modules/....
Rusty's user avatar
  • 356
1 vote
2 answers
88 views

I am attempting to migrate our single-page application from RequireJS to Webpack. As part of this transition, I am gradually rewriting our hundreds of modules from ASM define() syntax to modern ESM ...
John Brink's user avatar
0 votes
0 answers
30 views

Here is the demo project: https://github.com/Renderz/unbuild-test when I run npm run build then npm run test-cjs , the output shows { a: 1 } when I run npm run stub then npm run test-cjs, the output ...
yifeng jiang's user avatar
1 vote
1 answer
145 views

The following line works fine in the browser and in Bun: import { ApolloProvider } from "@apollo/client"; but when I run it in SSR (inside Tanstack Start / Vite / Vinxi) I get an error ...
Michael Lorton's user avatar
0 votes
1 answer
84 views

The library mode documentation for Vite has an example of a package.json that uses require for UMD modules and import for ESM and this is the example: { "name": "my-lib", "...
Ole's user avatar
  • 48.2k
0 votes
0 answers
30 views

Working on ArcGIS SDK for JS version 4.32.9 using React, facing issue import{_ as o}from"../chunks/ while importing Map ERROR in ./node_modules/@arcgis/core/views/MapView.js (./node_modules/css-...
Sagar Chougule's user avatar
0 votes
1 answer
102 views

I see a lot of people start a component like: export default function Example(){XYZ} Is that the same as writing the function and then exporting at the bottom of the page like so? function Example(){...
Aleks3000's user avatar
0 votes
0 answers
110 views

When trying to generate graphql queries automatically for my vite app, I'm encountering this error: 18:02 $ npm run codegen > [email protected] codegen > graphql-codegen /home/...
rmartrenado's user avatar
  • 1,616
2 votes
2 answers
118 views

I have a Firebase Functions project that has "type" set to "module" in package.json so that I can use ES6 syntax. Some of the files import data from another json file with a line ...
Matthew Michaud's user avatar
0 votes
0 answers
10 views

I'm building a Chrome extension and getting this error when trying to use ES6 modules in my content script: Uncaught SyntaxError: Cannot use import statement outside a module Here's my current setup: ...
Izaan's user avatar
  • 145
0 votes
1 answer
182 views

I am using ioredis in my Node.js + Express project with ES modules ("type": "module" in package.json). When I try to import Redis like this: import {Redis} from "ioredis";...
Rakesh Nagarkar's user avatar
0 votes
0 answers
15 views

I'm developing a Chrome extension (Manifest V3) and using ES6 modules in my content script (content.js). My code starts with: However, when the extension loads on https://nkiri.com/, I get the ...
3rippleflex 's user avatar
-1 votes
1 answer
175 views

To improve the project's functionality and overall performance. As part of this effort, we updated our SLS "handler.js" file to use ES modules and renamed it to "handler.mjs". The ...
Abdullah's user avatar
3 votes
0 answers
149 views

My goal is to import components from website A in website B using vite-plugin-federation so I can use the same components in both websites. For technical details: Both websites use the Qwik framework ...
Justin Slijkhuis's user avatar
0 votes
1 answer
63 views

I am running into an issue with Puppeteer where 'this' is undefined within the Puppeteer class instance methods when Puppeteer is imported into a module. When I import Puppeteer directly in my main ...
FusedKush's user avatar
2 votes
0 answers
439 views

This is my first VS Code extension and first code written in TypeScript. While I know support of ES Module extensions is still unsupported, I decided to try creating the extension loader as a CommonJS ...
sthames42's user avatar
  • 1,038
0 votes
0 answers
49 views

I am developing a custom pipeline task for Azure DevOps to extend commit lint's functionality. All source files (and node modules) have been packaged inside the .vsix file. However when running the ...
Martin C's user avatar

1
2 3 4 5
58