535 questions
0
votes
0
answers
85
views
Yarn workspace hoisting works on local but not in deployment
I am using Next.js (Server Side Rendering). When running the workspace locally, a package that is defined in the root package.json but used in a sub-directory works. However when deployed, a module ...
0
votes
0
answers
120
views
Facing type issues in node modules ../../node_modules/@types/leaflet/index.d.ts:2504:60 - error TS1109: Expression expected
I am getting error while creating the build for my app. But even trying multiple solutions like skiplibcheck, @ts-ignore, @ts-nocheck, upgrading and downgrading the version of react-leaflet library ...
0
votes
1
answer
206
views
Android build failure in a monorepo with a react-native package
After creating a new monorepo with a package for a new react-native project (0.77.2), the Android build was failing with the following error:
FAILURE: Build failed with an exception.
* Where:
...
0
votes
0
answers
111
views
Vercel and yarn v4 - using .env vars in yarnrc file
I’m using yarn v4 workspaces and need to be able to add an NPM token to access a private package.
Locally this works fine as I can either define a .env.yarn file or add it to my .env file and use the ...
0
votes
0
answers
29
views
yarn workspaces for lambda layer - how to only include prod deps in the layer
I am attempting to build a lambda-layer from within a yarn workspace. the basic pattern I am using was inspired by the code at https://github.com/lukehedger/yarn-workspace-lambda-layer.
This is the ...
0
votes
2
answers
554
views
NextJS not triggering hot reload after changes in sibling workspace (yarn monorepo)
I have a monorepo with several packages (ui-components, logging, etc) which are imported into the sibling app package. The app is a Next.js app with React & Redux.
After upgrading Next.js from v14....
0
votes
0
answers
78
views
Should I exclude pnpm workspace {projectRoot}/node_modules from Nx cache inputs?
I have a rather bespoke pnpm workspaces project based monorepo with minimal Nx for caching and project graph. In pnpm workspaces, each project has an anemic node_modules that usually just has symlinks ...
0
votes
0
answers
99
views
Yarn workspaces monorepo cannot find React Query module
I have set up a react native monorepo using Yarn Workspaces. The goal would be to write one App as core, and the versions for different platforms would be siblings of core in the monorepo and would ...
2
votes
1
answer
2k
views
How to run TypeScript, via ts-node, without ‘experimental’ warnings, and without file extensions on imports
I have a TypeScript project, based on Node.js, with several modules (using workspaces). Everything executes correctly, but I’m still receiving warnings. In particular, when running this (as a package....
3
votes
1
answer
160
views
Recursive install of node_modules in Pulumi resources
I have the following project I am using Pulumi to manage my various cloud run jobs. I am trying to set up all my package management to use a tool like mise for each of development. The problem is each ...
0
votes
0
answers
28
views
I'm doing mono repo setup for my existing react apps using yarn workspaces and CRA, but build code not converted to ES5 to support chrome 38
It seems after build my react app works well in chrome 38 version. But, after moving to mono repo structure, same code not working in chrome 38 after build and looks like some part for code I see not ...
0
votes
1
answer
223
views
Botpress v12 Dependencies Incompatible with Node Version
I am trying to set up the botpress v12 repo on my local machine.
I am facing issues during dependency resolution
This is my environment
OS: MacOS 15.1
Chip: Apple M2 Pro
Terminal: iTerm2 (arch: arm64)...
1
vote
0
answers
113
views
pnpm-lock.yaml removal in nextjs standalone build causes difference in output structure
I have a Yarn workspace project with the following structure
workspaceRoot
apps
common
web-common
server-common
chat
The chat project is a NextJS app (14.3). I inadvertently have a ...
1
vote
0
answers
426
views
drizzle-kit not able to find dirzzle-orm on cli
I'm using yarn workspaces to structure a monorepo style project. I recently upgraded to yarn v4 and am running into issues with running drizzle-kit seemingly not able to detect drizzle-rom when run ...
1
vote
1
answer
77
views
Multiple Vue.js builds - package workspace problem (Yarn and NPM)
I want to install two different versions of Vue.js in my project and I came to a dead end regarding multiple node_modules directories.
The problem is that up until now I used npm and single package....
0
votes
1
answer
803
views
Cannot find module /vitest/dist/chunks from /vitest/dist/worker.js when migrate to yarn v4 and to vitest
I use yarn workspases and one of workspaces threw this error:
file:///home/username/Projects/projectName/node_modules/tinypool/dist/chunk-E2J7JLFN.js:46
throw error;
^
Error [...
0
votes
1
answer
172
views
how to make yarn workspaces install package.json located in packages sub folder?
I have a folder structure like this:
root/
packages/
snackbar/
src/
example/
src/
babel.config.js
metro.config.js
package.json
tsconfig.json
...
0
votes
0
answers
88
views
Yarn workspaces build\deploy issue with AWS CodeBuild to ElasticBeanstalk
I have a monorepo with frontend, backend and my-common yarn workspaces.
+-- node_modules
+-- package.json
+-- tsconfig.json
+-- buildspec.yml
+-- my-common
| +-- package.json
| +-- ...
1
vote
1
answer
359
views
Yarn PNP module controlled by multiple pnpapi instances
I'm working on a React+vite application that uses yarn pnp. It worked fine, but now I'm having the following issue concerning yarn when I start the application (yarn dev or yarn build).
Error: Unable ...
0
votes
1
answer
403
views
Facing issue while upgrading yarn 1.22.x to 3.8.3 in azure build pipeline
I need to upgrade yarn 1.22.x to 3.8.3 in azure build pipeline. I have modified the pipeline yml file:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
checkLatest: true ...
0
votes
1
answer
309
views
How can I keep standalone lockfiles working in a mono-repo managed by Yarn?
I'm using a monorepo with Yarn workspaces as a means to manage a dozen or so WordPress plugins. Each plugin needs to be able to build (webpack) and deploy independently.
The issue happens occasionally ...
0
votes
1
answer
242
views
How to develop with an external npm package into a Yarn PnP monorepo?
I do have to work with a large Yarn PnP mono repo (~30 packages and 3 micro apps).
One of the packages (package-b) is using an external npm package package-a (which is using npm as a package manager) ...
1
vote
0
answers
212
views
How to debug a yarn workspaces webpack based TypeScript monorepo in WebStorm
Given a yarn workspaces with an app and multiple libraries all built with webpack 5, how do I debug with WebStorm or IntelliJ so that I can hit a breakpoint in a library?
I'm hosting with webpack-dev-...
0
votes
0
answers
321
views
React Native Safe Area build input files cannot be found
I've inherited a React Native project which built happily about 8 months ago. Now I have come back to it, I can't get it to build. Being a near incompetent on Apple platform development (I work mostly ...
3
votes
0
answers
231
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/
│ │ ├──...
2
votes
1
answer
917
views
Creating an NPM package from a yarn workspace monorepo with internal dependency
I'm using yarn workspace to develop a library that will be published on NPM. The library is dependent on a private core package in the same workspace. My understanding is that the workspace should ...
0
votes
0
answers
74
views
Are the 'pages' or 'app' directories in projects generally considered proprietary in Node
For example if someone has a GitHub repo that doesn't contain a pages or app directory, when you try to run npx next dev, you will get the following error.
▲ Next.js 14.2.3
- Local: http://...
0
votes
0
answers
989
views
yarn dev hangs on "Linking dependencies"
I have just started working on a reactjs application, and found that I cannot run the app using yarn on localhost at all, as it hangs after reaching "Linking dependencies". I am running this ...
1
vote
0
answers
76
views
How to import enum from shared yarn workspace
I have the following structure
my-package
package.json
packages
backend
package.json
frontend
package.json
vite.config.ts
shared
package.json
src
TimeRange.ts
my-package/package.json
{
"...
2
votes
0
answers
164
views
TS compiler confused about remapped paths in another workspace package
Context
Within a workspace (Bun/Yarn) I have a package server with this TS config:
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"~/*&...
1
vote
0
answers
116
views
Configuring Babel with Yarn Workspaces in React Native: Issues with babelrcRoots Configuration
We want to move our RN project to Yarn Workspaces.
We currently have two different .babelrc.json files for two different packages and from what I've found it requires adding babelrcRoots to the babel....
1
vote
1
answer
231
views
Jest failed at queryString using yarn/ Error:Cannot use import statement outside a module
I am currently facing an issue with queryString package using yarn. After reinstalling queryString using npm (In yarn documentation, there is no such command to add queryString package only npm). ...
0
votes
1
answer
774
views
Semver LRU is not a constructor in yarn workspace
I have a project that I migrated from a standalone npm package to a yarn package in a workspace. My config is working correctly for building and type-checking, but when I try to run yarn test, my test ...
0
votes
0
answers
284
views
NPM package depends on another package from yarn workspace. Module declaration of dependency not found in consuming project
I am working on a monorepo using yarn workspaces. One of my packages is a react library that is published to NPM. It depends on a core package within the monorepo which is not published.
I have set up ...
4
votes
1
answer
2k
views
NPM package within monorepo uses a local package not in the registry
I am working on a monorepo using yarn workspaces. One of my packages is a react library that is published to NPM. It depends on another package within the monorepo which is not published to the NPM.
...
0
votes
2
answers
183
views
Why are my yarn dependencies still listed if I deleted node modules
I have a project I am working on and I accidentally downloaded my packages with yarn after running yarn in the terminal.
I deleted the new node_modules folder and then ran yarn list -depth 0 and then ...
10
votes
3
answers
17k
views
Migrate my yarn project from [email protected] to [email protected]
My project is using [email protected] and node 16.x.x i want to update my node version to node 20 and i new that node 20 works with [email protected].
When i went to yarn page migration https://yarnpkg.com/...
0
votes
1
answer
52
views
unable to install npm package from github
I use a workspace into my app
"workspaces": [
"firstapp/web",
"secondapp"
]
Into second app, into package.json I get into dependencies:
"anotherapp&...
0
votes
1
answer
317
views
Yarn workspace - use `"type": "module"` for entire workspace?
Can't find any exact info on this.
I have set "type": "module" in my workspace root package.json, and I kind of assumed it would work across all workspaces, but it doesn't, and i ...
5
votes
1
answer
554
views
How can I tell `yarn workspace` to refer to executables at the root of my JavaScript monorepo?
I have a large JavaScript (TypeScript) monorepo with many subpackages:
root/
package.json
packages/
packageA/
package.json
packageB/
package.json
...
packageZ/
...
1
vote
0
answers
159
views
How can I centralize dependecny version when using `nx` in a monorepo with `yarn4 png`?
I have a typescript monorepo managed by nx. There are about 122 projects in this repo and all written in typescript nodejs. With yarn4 pnp enabled https://yarnpkg.com/features/pnp.
There are some 3rd ...
1
vote
0
answers
205
views
VSCode Go to Definition doesn't work for aliased package installed with yarn in a monorepo
In Visual Studio Code, for my JavaScript Node.js project, I expect to be able to put my cursor on a require line (see first code example below) and choose Go to Definition (typically F12), and it ...
0
votes
1
answer
903
views
Monorepo-Yarn workspace "Cannot find module or its corresponding type declarations." after build a package
I have a monorepo project using Yarn Workspace & Typescript
Folder Structure
packages
--- common
------ src
------ package.json
------ tsconfig.json
--- app
------ src
------ package.json
------ ...
2
votes
0
answers
119
views
How to seamlessly import typescript from internal sibling packages?
I'm trying to create a new web project that consists of 3 npm packages: 2 UI packages, and 1 shared code package. All 3 packages are REACT + TS vite packages.
I am trying to set this up using npm / ...
1
vote
1
answer
606
views
How to consolidate various package versions in yarn.lock?
After updating packages in a monorepo (using Turborepo by Vercel) so that all match the same versions, I noticed that there are still differing versions for many packages in yarn.lock file. For ...
1
vote
0
answers
780
views
"executor": "@nx/vite:test" doesn't create coverage when running from `nx affected`
We have a monorepo with yarn workspaces that uses nx to manage targets (=package.json scripts) and it runs jest by default for test target (defined with jest plugin in targetDefaults)
However, in 1 ...
1
vote
0
answers
324
views
Import from barrel files TypeScript/Yarn v4 monorepo
I'm working on a small monorepo project, using Yarn 4 workspaces with TypeScript. I've mostly got it working, but I've hit an edge(ish) case with some import paths.
I have a common library in this ...
1
vote
0
answers
102
views
Yarn - How do I update specific dependencies in package.json?
Recently I updated nextjs to "next": "^13.5.6",, which broke storybook. This was subsequently fixed and therefore the solution is to also upgrade all storybook related packages.
...
4
votes
0
answers
354
views
Is it possible to generate individual lock files in a yarn monorepo
We are setting up a new app, and we'd like to use a yarn monorepo. Each package in the repo is it's own app. We'd like to be able to deploy each app individually instead of the whole code base to each ...
1
vote
0
answers
273
views
How to build a standalone package that depends on other yarn workspace packages
I'm using Yarn workspaces to link my packages in a TypeScript monorepo. Everything works fine, every package has its own tsconfig and I'm using references and composite in those tsconfigs.
I can ...