Questions tagged [yarnpkg]

This tag is for Yarn v 1.x. See version-specific tags, as version differences are significant. Yarn is an open-source JavaScript package manager. With Yarn, engineers have access to the npm registry and can install packages quickly, and manage dependencies consistently across machines or in secure offline environments.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Is it safe to create a symlink in a dockerfile to /run/secrets/my_build_time_secret in the first stage of a multistage dockerfile

I have this docker-compose.yml: secrets: my_app_npmrc: file: "/some/path/.npmrc" services: my-app-front: hostname: my-app-front build: context: "/some/path" ...
lud's user avatar
  • 1,921
2 votes
0 answers
25 views

node program run in cli using node index.js! Edge-js works but when running after converting into exe using pkg package memory corrupt error comes?

I have written a node program in which edge-js package is being used and it works pretty well when running it directly through the node index.js command but afterwards when i convert the program to ....
Sheikh Ibrar's user avatar
-1 votes
0 answers
31 views

How to solve warnings when I start project with command "yarn create react-app . "?

I have a lot of warnings creating new app using yarn create react-app . --template typescript. How to solve it? warning react-scripts > babel-preset-react-app > @babel/plugin-proposal-optional-...
дима макар's user avatar
0 votes
0 answers
26 views

React-Native project won't run on the right node -v for EAS IOS build

I have a project I'm trying to create an IOS build for using EAS ("eas build --platform ios"). With everything I've tried I keep getting this error on the expo.dev site claiming that I'm ...
Mandella90's user avatar
0 votes
0 answers
12 views

Updating React js dependencies giving issues after upgrading them

I am upgrading the REACT packages to the latest packages but after some error in the some package upgrade I am trying to restore the packages to the old version. Packages to upgrade :- "react-...
Henil Mehta's user avatar
0 votes
0 answers
47 views

error: node_modules\expo\AppEntry.js: Unexpected token 'export'

I'm having problem with my Expo project. While running my app yarn start, I'm facing this error: Android Bundling failed 449ms error: node_modules\expo\AppEntry.js: Unexpected token 'export' Here is ...
Snehasish Konger's user avatar
0 votes
0 answers
14 views

Trying to get a branch of a github repo into my code. Even though I'm using what I'm pretty sure is correct in package.json, it runs master instead

I'm trying to get a certain branch that I'm working on on a repo into my code to use as a library, but even though its linked correctly, its still using master. This is the current line that should be ...
DefinetlyNotRaze's user avatar
-1 votes
0 answers
16 views

"yarn dev" error Couldn't find the binary vite [closed]

I just created a new react project with yarn create vite and on the final step which is running the yarn dev command i get this error: yarn dev error Couldn't find the binary vite I already check the ...
Carlos Estrada's user avatar
1 vote
0 answers
19 views

Gulp not recognizing ts-node in his folder "gulpfile.ts/"

I'm using TypescriptToLua to make my Lua scripts with typescript in a way i'd prefer to, with addition of GulpJS, so I can process them by "minify" and bundle all them in a way better for me,...
hzmstr's user avatar
  • 36
0 votes
0 answers
22 views

How to install private git repo with Yarn via access tokens without hardcoding in package.json?

I thought I could use .npmrc for v1 or .yarnrc.yml for v2/3/4 but in all cases Yarn doesn't even try to authenticate to Github nodeLinker: node-modules npmScopes: packagescope: npmAlwaysAuth: ...
Slbox's user avatar
  • 11.1k
0 votes
0 answers
22 views

How to force Yarn to ignore yarn.lock and always install latest version?

In my package.json file I have a dependency which I want to be always the latest version, no matter what's in yarn.lock or yarn cache, without having to run yarn update or something similar each time ...
cis's user avatar
  • 1,261
0 votes
0 answers
161 views

Can't create a new react-native project using npx react-native@latest init

I am relatively new to react-native. and also recently decided to dual boot ubuntu alongside windows 10 on my laptop. whenever I create a project in windows using the command npx react-native init , ...
Place Holder's user avatar
4 votes
3 answers
199 views

Nextjs, Vercel | GET https://registry.npmjs.org/next/-/next-13.5.0.tgz - Not found

enter image description here error: next@https://registry.npmjs.org/next/-/next-13.5.0.tgz' is not in this registry build is failing on vercel deployment. it was working fine a few minutes ago, all ...
Kartik Dhawan's user avatar
0 votes
0 answers
10 views

ReactJS Parse initialisation using Back4App

Please, guys, I need help initializing parse from Back4App I am using React + Vite, and Yarn package installer. https://i.stack.imgur.com/eVOAy.png
Chibu's user avatar
  • 13
-1 votes
1 answer
20 views

The yarn command has no output

My yarn command returns immediately, displaying nothing to stdout. Even basic commands like yarn -v display nothing. I am on mac osx and recently ran the migration tool from an x86_64 to M2 macbook ...
Quinlan Jung's user avatar
0 votes
0 answers
27 views

unable to install sharp package using yarn

when I run yarn add sharp I get the below call stack. I tried manually installing semver with the below command with no luck either. rm -rf node_modules rm yarn.lock yarn add semver yarn cache clean ...
Hudson Basso's user avatar
0 votes
1 answer
17 views

yarn commands are not working on node v18 with macbook

I'm using nvm to switch between node versions. When I choose node v16, yarn is working fine on my Macbook. But when I switch to node v18 using nvm I'm getting this error. yarn install v1.22.19 info No ...
Lakpriya Senevirathna's user avatar
0 votes
0 answers
32 views

Trouble passing Bitwarden Secrets in Azure Devops

I try to use secrets from Bitwarden Secret Manager in an Azure Devops Pipeline. So I install the Bitwarden SDK, fetch the secrets and set it as env vars, which is all fine. Printing the Token variable ...
monstermuffino's user avatar
0 votes
0 answers
21 views

VSCode quick import work with ctrl + space, but not with ctrl + . with Vite + React project

as above, project initialized with yarn + vite + react OS: win 10 pro This is file structure: vite.config.js: import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export ...
Shimi Shimson's user avatar
0 votes
2 answers
27 views

Runing a command on a local folder with Jenkins

I have this folder structure: /home/user/project common web mobile I would like to run yarn test in every on this folders in parallel and I would like to use Jenkins (or something else?) to have an ...
BenNG's user avatar
  • 531
0 votes
0 answers
15 views

Quickly determine when npm overrides are no longer necessary

To assist in keeping sub-dependencies up-to-date as an open vulnerability works its way through the SDLC of repositories (or doesn't in the case of unsupported packages), we have the opportunity to ...
sbonami's user avatar
  • 1,892
0 votes
1 answer
130 views

Install and run yarn inside the docker container

I have docker build which works fine. But i want to install version specific yarn inside the container(it is the task) and run it after building, cause i dont want rebuild the container for install ...
 kvaizer999 's user avatar
1 vote
0 answers
16 views

Yarn 3 how to fix incompatible transitive dependencies?

Say I have a dependency graph like this: root - d1 - d3 (v1.1) `- d2 - d3 (v1.2) and for some reason d3 v1.1 and v1.2 are incompatible (i.e., d1 has to use d3 v1.1, d2 has to use d3 v1.2). Is ...
stackoverflower's user avatar
0 votes
0 answers
24 views

Sveltekit bwip-js QRCode

Its probably a newbie problem (Not understanding what is difference between, nodejs, browser and react code). I am using bwipjs-js to generate QR code in my sveltekit app. I am using bwipjs (toCanvas(....
Sardar Faisal's user avatar
0 votes
0 answers
52 views

React gives an error message "cannot be used as a JSX component"

After installing the dependencies, errors appeared throughout the project like Component cannot be used as a JSX component. Error Example The error is kind of strange, i ran the project with exactly ...
ARSync's user avatar
  • 11
4 votes
1 answer
116 views

Installing private npmjs packages fail when yarn.lock is present

I have a project that depends on some packages that are published to a private npmjs account. For example, @myaccount/first-package. I have a project level .npmrc file that has following configuration,...
charith.arumapperuma's user avatar
0 votes
0 answers
20 views

How to extract a folder from a TypeScript module and properly reference its classes?

I am working on a Yarn/Node/TypeScript project, and I need to restructure the directory of one of the modules, say module_a. Currently, there is a subfolder within module_a called sdk, and I want to ...
irobson's user avatar
  • 825
0 votes
0 answers
11 views

visual studio typescript package not found installed through 'yarn' on the custom folder

I developed some typescript modules. these modules need some typings (e.g jquery). something like this private GetModal(id: string): JQuery<HTMLElement> { let $modal = this.getDiv("...
Ehsan Vali's user avatar
0 votes
1 answer
64 views

Loading PostCSS "postcss-normalize" plugin failed: Cannot find module 'postcss-normalize'

node v16.16.0 yarn 1.22.19 After package upgrade and loading my react app, i got this error ERROR in ./src/index.css (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!./...
user3552178's user avatar
  • 2,729
0 votes
1 answer
35 views

Why is npm looking for node in the wrong place? /usr/bin/env: ‘node’: No such file or directory

I know I can "fix" this issue with a symlink or some such hack. What I want to know is how can I fix this issue without hacking my system. Why is npm unable to find node where it is? I have ...
Hawkeye Parker's user avatar
0 votes
0 answers
74 views

Yarn build failing because of babel plugin "Error: Cannot find package '@babel/plugin-preset-plugin-proposal-class-properties'"

I'm working on a rails 7 app that uses yarn. I've been trying for several hours to debug an issue during the built process without luck. When I call yarn build, the build fails with: yarn run v1.22.19 ...
phoxley's user avatar
  • 464
2 votes
0 answers
48 views

Is there a way to override the same name `npmScopes` inside `.yarnrc.yml`?

Background My organization has two registries of the same name (say my-org); one is public and is hosted via NPM, and the other one is private and hosted in GitHub. Unfortunately, there is no registry ...
aayani's user avatar
  • 363
0 votes
1 answer
24 views

Finding all installed versions of an npm package using the yarn API

My goal is to prevent out-of-order deployment of a back-end and an app. All of the software is written in JavaScript. The back-end interface is wrapped up in a API client npm package, which the app ...
joshuanapoli's user avatar
  • 2,509
0 votes
0 answers
55 views

How to fail `yarn install` when there are warnings during post-resolution validation?

I'd like yarn install to fail when there are warnings in the post-resolution validation, so that we can catch these problems in CI. You'd think this would be a simple command-line flag, but I'm not ...
Evan's user avatar
  • 2,400
0 votes
0 answers
43 views

Next.js NODE_OPTIONS is not compatible with yarn v2

Important info: yarn 2 (berry) Next.js I have a following script to run Next.js app (either next dev or next start), and to initialise Datadog APM tracing: "dev": "NODE_OPTIONS='-r ./...
M.Wasik's user avatar
0 votes
0 answers
43 views

React compilation error using Yarn start or npm start

I am trying to create a React app using VS Code but am getting compilation errors. I used the command npx create-react-app directory and that worked fine. I then used the command cd .\directory to ...
transpose's user avatar
3 votes
0 answers
153 views

Yarn monorepo performance issues during development: Many "The code generator has deoptimised the styling" messages

My monorepo looks as follows: app1 packages/package1 packages/packageN This is a yarn 3 monorepo with turborepo for caching build assets. App1 consumes package1. App1 is a simple Vite React app. ...
aborted's user avatar
  • 4,491
0 votes
0 answers
39 views

Express typescript error Error: Access denied for user ''@'172.18.0.1' (using password: YES)

so according to Express file architecture i have a file named database.ts and it's working fine.Also i'm using mysql DB, however when i tried to make routes for the database it won't connecct to mysql ...
Moshaah's user avatar
0 votes
0 answers
19 views

What does Yarn package manager do after fetching the dependencies but before running the linker?

I'm currently investigating some performance issues with Yarn package manager in our CI system. In short, the package manager seems to take much longer to run in our stateless container than it does ...
Cameron's user avatar
  • 2,805
0 votes
1 answer
26 views

Expo CLI - Error: Cannot find module '/home/expo/workingdir/build/.yarn/releases/yarn-1.22.19.cjs'

I currently have an ejected Expo 46.0.9 react-native app. The app lives under a shared nx monorepo (although it isn't connected as one through its project.json) I've been using the following command ...
Jose A's user avatar
  • 10.1k
0 votes
0 answers
16 views

yarn add chromedriver installs node_modules in the macos user directory

On macOS, in /Users/Username/Documents/Projects/Projectname/, running sudo npm install --location=global yarn in VS Code installs yarn. In the same VS Code session, and in the same project directory, ...
Steve's user avatar
  • 2,156
0 votes
1 answer
51 views

Cannot install any packages with yarn add

In my react application, I recently switched package managers from npm to yarn. I'm trying to install some redux packages but they all fail. Commands like yarn add redux and yarn add react-redux all ...
Victor Cui's user avatar
  • 1,401
-1 votes
1 answer
64 views

Trying to compile this dapp and i get this error, I do not know what to make of it, as the files are all there

PS C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp> yarn hardhat compile yarn run v1.22.19 $ "C:\Users\MOON AI\Desktop\New folder\mantle_crowdfunding-dapp\node_modules.bin\hardhat&...
Etiosa Kings's user avatar
0 votes
0 answers
20 views

Install peer dependencies as dev dependencies when developing a package?

My package foo depends on a module bar as a peer dependency. So aribtrary parent buzz would install foo, and need to install bar for it and foo to share it. I'm now developing foo and adding bar as a ...
Brother58697's user avatar
  • 2,322
0 votes
0 answers
39 views

React Native reusable components with Yarn workspace

I want to make monorepo with multiple react native apps and shared packages. I had to add nohoist for every RN app and to configure Metro to watch shared code like: watchFolders: [ path.resolve(...
Nemanja Pavlović's user avatar
0 votes
0 answers
62 views

(React + Vite) build error on ubuntu server 22.04

I'm trying to build my project on the server side. It's working perfect on local. But when trying to build from the server it's getting stock after sometimes. Sometimes it's giving an error error ...
Ibnul's user avatar
  • 1
0 votes
0 answers
30 views

Yarn "command not found" when switching node with nvm from 18 to 14

I am running node 18 (installed with nvm) and everything is fine. Yarn works fine. However when I switch to node 14 nvm use 14 then yarn cannot be found zsh: command not found: yarn. If I run nvm use ...
utnalove's user avatar
  • 159
0 votes
1 answer
28 views

How do I revert a package update with yarn, including any extra files that appear after 'yarn add'?

I am using prisma and had an issue where the engine download was stopping at 60% and just not downloading when I tried to migrate. I waited a few days and it randomly seemed to work suddenly. It ...
Adam Cole's user avatar
0 votes
0 answers
18 views

Find the root of a yarn mono-repo programmatically

I am writing a cli tool, and I want to detect the root of a mono-repo no matter what is the cwd. What is the best way to do achieve it? If it helps, I am targeting yarn3. Is there a way to somehow ...
niryo's user avatar
  • 1,285
1 vote
1 answer
279 views

Yarn: 401 Unauthorized when installing a package from a private repository

I use the private repository built into gitea. The official documentation gives these settings: npm config set {scope}:registry https://gitea.example.com/api/packages/{owner}/npm/ npm config set -- '//...
Vladimir's user avatar

1
2 3 4 5
83