Skip to main content

All Questions

Tagged with
0 votes
0 answers
24 views

Issues with zxing-js/library and Rollup Build: "this" has been rewritten to "undefined"

I'm new to JavaScript and TypeScript and I'm using the zxing-js/library package in my project. When I try to build my project with Rollup, I'm encountering the following errors: (!) "this" ...
Ophir Yaniv's user avatar
1 vote
2 answers
45 views

Install a TypeScript package from GitHub repository subfolder

I'm using react-select on my ReactJS module, and I needed to make some changes to fit my needs. But now, I'm trying to install my own fork using NPM, and it doesn't work. Error message: Module not ...
William Brochensque junior's user avatar
2 votes
0 answers
33 views

Cannot find type declaration in yarn workspace common packages

Need some help declaring global modules using yarn workspaces. Can't figure out where to put declarations so they work as expected File structure: root/ ���── app/ ├── common/ │ ├── assets/ │ │ ├──...
Karolis's user avatar
  • 46
0 votes
0 answers
29 views

Getting "semantic error TS2339: Property 'hgetall' does not exist on type 'Redis'" when creating a package with ioredis and tsdx

I used npx tsdx to create a basic module. I then added ioredis package. When I use methods like hgetall or del in the package I get this typescript error (typescript) Error: /sample/redis-package/src/...
kheme's user avatar
  • 31
0 votes
1 answer
145 views

yarn ts-node-dev requires defining dependency to src folder

Can you help me understand this behavior and share how would you solve this "properly"? I'm running Node.JS (v20.12.2), Yarn (4.1.1), tsc (5.4.5) and have following goals: Run the app ...
ppavlov's user avatar
  • 127
0 votes
1 answer
236 views

Error when running 'yarn install' command in React project: 'The term 'yarn' is not recognized

I'm facing an issue while trying to run the 'yarn install' command in my React project. I've globally installed Yarn (npm install --global yarn), but when I attempt to execute any Yarn command in the ...
Adnan Yağmur's user avatar
0 votes
0 answers
56 views

Importing modules with yarn dlx @yarnpkg/sdks vscode command in latest version of TypeScript does not resolve issue TS2307

I'm using yarn version 3.5.0 and my IDE is using vscode. To tell vscode that I'm using yarn berry, I use the command yarn dlx @yarnpkg/sdks vscode, and it works in TypeScript version 5.0.4, but when I ...
Jiwoo's user avatar
  • 1
0 votes
0 answers
309 views

How to build TypeScript/MJS package compatible with NodeJs?

I try to write a TypeScript/MJS package for NodeJS (v20) application, but face errors like : "exports is not defined in ES module scope" or also "Unexpected token 'export'" or &...
serge's user avatar
  • 14.8k
0 votes
1 answer
492 views

nest start removes my json files from dist

when I build my nestjs application, I need certain json files to be copied to the dist. especially I have an "engines" folder, and I need the json files to be on dist/and prod, as they are ...
serge's user avatar
  • 14.8k
0 votes
0 answers
28 views

An import works in Code, but does not work in `yarn start`

In MS Code this import is not highlighted as an error: import { keccak256 } from "ethers/lib/utils"; but when I try to yarn start, it produces errors. [1] ✘ [ERROR] Could not resolve "...
porton's user avatar
  • 5,648
0 votes
0 answers
160 views

How to set ELECTRON_MIRROR in yarn4

An error occurred when I used yarn4 to install Electron in the project. The specific error is as follows: PS D:\code\ali-live-tools> yarn ➤ YN0000: · Yarn 4.0.2 ➤ YN0000: ┌ Resolution step ➤ YN0000:...
王昱旸's user avatar
0 votes
0 answers
178 views

Why does yarn work but node or tsc fails?

I am trying to learn (I only know Python) the OpenAI API with TypeScript via LiteLLM. I found some examples like (openai.ts) import OpenAI from 'openai'; const openai = new OpenAI({ baseURL: "...
yarun can's user avatar
  • 3,217
1 vote
0 answers
407 views

setting up project with Yarn 4 pnp, webpack and typescript

I am trying to set up my project with Yarn and webpack and typescript. You can see the code below. The problem I have is that when I import another .ts file, it gives me an error and can't resolve the ...
user avatar
0 votes
2 answers
282 views

Why is module version different from what I wrote in package.json?

I made project with create-next-app. And I downgrade next version to 12. After then, I installed some modules that I need with yarn. I set some module's version such as typescript, react, and so on. ...
loveloper.dev's user avatar
0 votes
1 answer
112 views

How to build typescript files so I can use them in frontend

I got an index.ts file and it basically exports an object and some functions that does some stuff with that object. Below is a minimal example: export const myObject = {a: 1, b: 2} export function ...
Mertcan Karık's user avatar

15 30 50 per page
1
2 3 4 5
20