Questions tagged [yarnpkg-v2]

Use this tag for version specific questions about Yarn version 2.x. Yarn is an open-source JavaScript package manager created by Facebook, Exponent, Google, and Tilde. When using this tag also include the more generic [yarnpkg] tag where possible.

192 questions
0
votes
1 answer

Running test with Jest in repo using yarn: SyntaxError: Unexpected token 'export'

After adding a new package (date-holidays), when running tests with Jest, the following error appears: Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its…
GoWithTheFlow
  • 252
  • 6
  • 16
0
votes
0 answers

Can I have multiple emails in the bugs section of package.json?

In a package.json file, in the bugs section one can add an email address. Is it possible to add multiple email address, let's say in an array? "bugs": { "email": "email@domain.com" },
user5507535
  • 1,580
  • 1
  • 18
  • 39
0
votes
3 answers

How can I install devDependencies of one of my devDependency?

In a Node project, I want to install all devDependencies of one devDependency of my project. By default NPM/Yarn will install only the dependencies of my dependencies, but not the devDependencies. Is there a way to install all devDependencies of a…
user5507535
  • 1,580
  • 1
  • 18
  • 39
0
votes
0 answers

Next build script hangs forever

I am trying to build an app with NextJS and Typescript. However, every time I try to run the yarn build command, it hangs forever time in the Creating an optimized production build... part. This happens both when I build locally and on the…
Daniel Corona
  • 839
  • 14
  • 34
0
votes
0 answers

How do I configure Yarn to send the X-Frame-Options header with every response?

Our team is in the process of making our application safe from clickjacking attacks. It's an Angular application that gets served by yarn. We want to configure our yarn server to include an X-Frame-Options header in every response it sends. We…
0
votes
0 answers

How to use the TypeScript version of the project not the .yarn/sdks/typescript/lib for VS Code

I am using Yarn v3 and PnP. Following the Editor Setup#vscode guide, but the VSCode will use the TypeScript version generated by below command: yarn dlx @yarnpkg/sdks vscode It will generate a new directory called .yarn/sdks, and there will be a…
Lin Du
  • 88,126
  • 95
  • 281
  • 483
0
votes
0 answers

YN0001: RequestError: unable to verify the first certificate

Following the yarn official migration guide: When I try to download yarn plugin like step 10, the command: ⚡ yarn plugin import interactive-tools Got error: ➤ YN0001: RequestError: unable to verify the first certificate at…
Lin Du
  • 88,126
  • 95
  • 281
  • 483
0
votes
2 answers

How to use Google Cloud Build with Yarn 2+

How do I use Google Cloud Build with Yarn 2+? Do I need to create my own node image to support this or is there some shorthanded entrypoint like entrypoint: "yarn2" Cloud Build with NodeJs: steps: - name: "node" entrypoint: "yarn" Currently…
Maroben
  • 45
  • 7
0
votes
0 answers

Bug: ERROR in [eslint] Failed to load config "react-app" to extend from package.json

I am getting this error after saving any changes inside code files:: ERROR in [eslint] Failed to load config "react-app" to extend from. Referenced from: /Users/archana/Documents/Workspace/my-app/package.json Steps to Reproduce:: I have migrated…
Archana Sharma
  • 1,953
  • 6
  • 33
  • 65
0
votes
0 answers

Running sbt commands through Yarn in Windows

I'm trying to run an sbt command in yarn (any at all), and every time I run it I get this error $ yarn sbt yarn run v1.22.19 warning apache-daffodil-vscode@1.2.0: The engine "vscode" appears to be invalid. $ sbt…
NolanPower
  • 409
  • 3
  • 11
0
votes
0 answers

Cypress + yarn/npm won’t run a CLI command in `after:run`, only in `before:run`

I want Cypress to execute custom scripts before and after running the specs suite. The before:run and after:run APIs look perfect for that. But the same snippet that works perfectly in before:run doesn’t seem to work in after:run: module.exports =…
sylbru
  • 1,461
  • 1
  • 11
  • 19
0
votes
0 answers

Yarn 2 logfilters for Default Steps

In Yarn 2 I am using logFilters to hide some logs. This works for warnings, but I would like to hide the default messages, such as Resolution step etc as well. Except for Done. How can I achieve that? Please find my .yarnrc.yml code…
Z0q
  • 1,689
  • 3
  • 28
  • 57
0
votes
1 answer

Getting into a yarn dev 'category'?

A Yarn Getting Started Recipe tells me how to install Typescript using yarn: yarn add --dev typescript But when I then type, for example, tcs app.ts for typescript to compile my app.ts file I get the error zsh: command not found: tcs How do I get…
dumbledad
  • 16,305
  • 23
  • 120
  • 273
0
votes
0 answers

Yarn install Lerna monorepo directory with local dependencies

I have a monorepo that has 20 visual components built using Lerna. This component library is being used by another app repo and is included in it's package.json I'm pulling in a single component from the component library into the app using a Yarn…
Richard Fernandez
  • 558
  • 1
  • 6
  • 18
0
votes
0 answers

Is there a way to get auto-import and intellisense for JavaScript projects using Yarn2+?

VS Code provides auto-imports and intellisense in JavaScript files in projects using npm. I know we can use editor SDKs to get intellisense for installed packages in a TypeScript project by using the workspace version. I have tried everything I can,…