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.
yarnpkg
1,837
questions with no upvoted or accepted answers
23
votes
0
answers
3k
views
With Yarn workspaces, how can compiled binaries be linked to the workspace post-compilation?
Context
Yarn workspaces provide for a convenient mono-repo-like functionality where packages are automatically linked. I.e. they can require/import each other, and their binaries are linked and ...
11
votes
2
answers
5k
views
Attempted import error: 'shouldUseActivityState' is not exported from 'react-native-screens'
I'm getting this error :
C:/Users/Mobile/node_modules/@react-navigation/drawer/lib/module/views/ResourceSavingScene.js
Attempted import error: 'shouldUseActivityState' is not exported from 'react-...
11
votes
0
answers
2k
views
Allowing deep imports from npm packages without a build directory (like lib/dist) in the path
The standard approach when packaging code for npm is to place transpiled or bundled code in a separate lib, dist or build directory and to set the package.main property (and module/browser) to point ...
11
votes
1
answer
6k
views
npm equivalent of yarn install --check-files (or yarn check)
Update for 2020
This question originally referred to the yarn check command, but the docs state that this is deprecated in v1, and removed in v2, and yarn install --check-files should be used instead.
...
11
votes
1
answer
2k
views
yarn 2 (berry) doesn't use .yarnrc.yml from home directory
I would like to use npmAuthToken from .yarnrc.yml which is located in my home directory
~/.yarnrc.yml content
npmScopes:
company:
npmAuthToken: NpmToken.token
~/Project/MyProject/.yarnrc.yml ...
10
votes
0
answers
702
views
Deploying yarn workspace monorepo app with internal dependencies to Google App Engine
I want to deploy my app from my monorepo to GAE. The app depends on local packages that I pre-publish to github packages. To make life easy, I just tell my app to always get latest:
"...
10
votes
1
answer
1k
views
Specify different Yarn install paths for ‘devDependencies’ and ‘dependencies’
I’m using Yarn to manage my dependencies for my project. I have developer dependencies (devDependencies) required for development and front-end dependencies (dependencies) that my project will require ...
9
votes
1
answer
2k
views
Force version of transitive dependency (dependency of dependency) with yarn
I am using the package "csv-file-validator": "^1.8.0" which comes with 3 dependencies
famulus "2.1.2"
lodash "4.17.15"
papaparse "^5.2.0"
I would ...
9
votes
0
answers
5k
views
How to permanently exclude specific transitive dependencies in NPM
I have a Vue.js project with only 24 direct dependencies in the package.json. That results in 1230 total dependencies in the package-lock.json.
One of the transitive dependencies has a license that is ...
9
votes
2
answers
1k
views
Yarn/NPM linked package is not showing changes in browser
Context
I have two projects, main and styles.
Main uses styles as an npm package, importing it as @companyname/styles.
I need to make changes to styles and want to link it locally to see these ...
9
votes
0
answers
2k
views
How to remove yarn workspaces correctly?
I configured 2 workspaces in package.json e.g example and gatsby-theme but later I found I was actually developing a gatsby-starter so I removed the example workspace that depended on the latter ...
9
votes
0
answers
741
views
Find cross-package dependencies between yarn workspaces
Having multi-module TypeScript codebase living in monorepo and linked together using yarn workspaces.
Root package.json declares each module as a workspace and dependency.
{
...
"workspaces"...
9
votes
0
answers
1k
views
yarn / npm bulld completes then hangs indefinitely
Anyone have any experience with this? Running yarn build completes the build but never exits the process, it just hangs... The same thing happens when i run npm run build
stars-app|master⚡ ⇒ yarn ...
9
votes
0
answers
12k
views
Yarn behind corporate proxy ignores npmrc settings
Is there a possibility that Yarn does use the configuration from npm? All the necessary settings are existing in the .npmrc file and yarn should use them too.
One of the standard errors behind ...
9
votes
1
answer
2k
views
Yarn Workspaces And Webpack Hot Module Reloading React App
I am using Yarn Workspaces to manage a mono repo. I am using webpack 4 for hot module reloading. In my mono repo I have an app, a UI component library, and another component library for authorizing ...