All Questions
105
questions
20
votes
8
answers
20k
views
share env variable beween turborepo monorepo project
I ve setup a basic turborepo project and I want to share .env variables across the all the apps and some of packages. If I set one .env file in the root of project and how can all apps and packages ...
12
votes
2
answers
9k
views
How to use Turborepo for an existing react app created with Create React App in order to make it a monorepo?
I have a fun project made with create react app. I want to convert the same application to a browser extension. This idea forces me to make the project a mono repo. Because in both applications, I ...
9
votes
3
answers
6k
views
Turborepo Eslint config not applying
I created a Turborepo testing project and I wanted to try if ESlint config that it's set in the root of the Turborepo applies to all of the projects inside my /apps folder, turns out it does not work ...
8
votes
1
answer
2k
views
webpack not bundling packages in monorepo (turborepo) then throws "unexpected token 'export'"
EDIT: Repository where issue can be reproduced easily:
https://github.com/sebastiangug/turborepo-nestjs
I have a turborepo project with several nestjs applications that share various packages.
I've ...
7
votes
2
answers
4k
views
Styling issues in monorepo with Turborepo, SvelteKit and Tailwind
I’ve created a monorepo with Turborepo that contains 2 SvelteKit apps and 2 packages: a component library (which is also based on SvelteKit) and a configuration package.
root
|
|- packages
| |- ...
7
votes
2
answers
7k
views
How to share Vite config in monorepo?
I am trying to make monorepo using Turborepo. I have a lot of Vue projects there and I need to share Vite config across all applications. Here's how I'm trying to achieve this.
I have package named @...
7
votes
1
answer
2k
views
Turborepo set order of execution for dev pipeline
I have following scenario:
/apps
/api
/web
/packages
/shared
api and web have a dependency on shared. They are both installed with workspace: * using pnpm.
My turbo.json looks like this:
{...
7
votes
2
answers
8k
views
How to use monorepo packages with nestjs using turborepo?
Here's what a real simple monorepo with nestjs using turborepo looks like:
.
├── README.md
├── apps
│ └── nest
│ ├── README.md
│ ├── nest-cli.json
│ ├── package.json
│ ├── ...
7
votes
0
answers
789
views
How to pass arguments to filtered workspaces separately using Turborepo?
My use case is, I have two workspaces say foo and bar, and I want to pass the different command line args, is it possible to achieve such functionality with Turborepo.
I want to do something like this:...
7
votes
1
answer
2k
views
"Error: Invalid hook call." when importing React component from shared component library in monorepo (turborepo & npm workspaces)
I've been setting up a monorepo with the goal of creating a shared component library to use for several different Next.js apps (following this example) but whenever I import a component from the ...
6
votes
1
answer
4k
views
Turborepo -- how to nest applications in the 'apps' folder or different top-level directory?
I'm trying to create a turborepo that contains several types of infrastructure like terraform, potentially 100+ 'serverless' functions.
Ideally, I'd like to organize them a bit more into a subfolder ...
6
votes
0
answers
1k
views
Turborepo preparing engine: Could not find "___ROOT___#build" in root turbo.json
When i run yarn build i get this error :
ERROR run failed: error preparing engine: Could not find "___ROOT___#build" in root turbo.json
Turbo error: error preparing engine: Could not find &...
6
votes
0
answers
854
views
Can I publish only a subset of packages in one Turborepo, using Changesets?
As seen in the Turborepo docs, the monorepo can include internal packages in order to share code between apps inside the monorepo.
There is also a docs section on how to publish packages in a monorepo,...
6
votes
0
answers
563
views
Create Common Shared Pages Working With Next JS and Turborepo
I have a monorepo created with turborepo which contains two next.js apps. The structures is as follows
base
|---apps
| |---editor
| | |---pages
| | |---index.js //this file is ...
5
votes
1
answer
10k
views
yarn not installing packages from workspace but instead tries pulling down from npmjs with turborepo
Version:
"packageManager": "[email protected]"
I have based my project off of the npx create-turbo@latest command.
I have eslint-config-custom and tsconfig projects inside my /packages ...
5
votes
1
answer
4k
views
How to setup turborepo with sveltekit and pnpm
I am trying to add Turborepo to my Svelte apps but looks like the npx create-turbo@latest command and also the examples currently only support NextJs. How can I configure it to work Svelte and ...
5
votes
1
answer
2k
views
VSCode - Turborepo - Automatic import suggestion for local packages misses the main entry point
We recently regrouped several repositories into a single monorepo using turborepo for better code reusability using local packages.
Our folder structure looks like this:
/apps
| /app1
| /app2
/...
5
votes
1
answer
5k
views
How to fix the error: "No Next.js version could be detected in your project." when deploying to Vercel with Turborepo and pnpm
I am trying to deploy the Turborepo example app to Vercel using instructions from here, and getting the error:
Error: No Next.js version could be detected in your project. Make sure `"next"` ...
5
votes
0
answers
2k
views
Correct turborepo filter to get "affected" workspaces on push to main
Whenever a pull request is merged to main branch, i want to run turborepo run build command only on the affected workspaces. With nx.dev, i just use the ${{ github.event.before }} SHA to set as base ...
5
votes
0
answers
2k
views
Cannot find module 'postcss-preset-env' error using create-react-app inside an npm workspace
I'm trying to add a create-react-app app inside a Turborepo monorepo.
Problem is that if I run npm install from the root of the monorepo and then try to start the CRA app by running npm run dev, I get ...
4
votes
1
answer
3k
views
How to create a shared package in a Turborepo (monorepo), for prisma generated models and types?
I am creating a monorepo using Turborepo consisting of multiple Nestjs microservices, and an API gateway to act as the request distributer. In each microservice, Postgres is used as a database and ...
4
votes
1
answer
1k
views
Adding dependencies to the "ui" package of a Turborepo with Next.js throws Unexpected token 'export'
If you run
npx degit vercel/turbo/examples/with-react-native-web with-react-native-web
cd with-react-native-web
yarn install
To create a basic Turborepo that has a Nextjs application, a react-native ...
3
votes
1
answer
949
views
How to use a global .env file at root with SvelteKit and Turborepo?
Is there a way to share a .env.local env variables file through my entire Turborepo app? So far it is not recognized through my SvelteKit website
I've seen around that I could use dotenv-cli in the ...
3
votes
1
answer
566
views
Keystone crashes inside Turborepo
Keystone fails to find dependencies while running yarn build inside a new Turborepo project.
Steps to reproduce
Install Turborepo in a new project npx create-turbo@latest
navigate to the apps folder ...
3
votes
1
answer
7k
views
How to use TurboRepo to rebuild apps that rely on a changed package (local)
I'm currently setting up TurboRepo alongside yarn workspaces and I'm having trouble getting it to rebuild our main app whenever one of the local packages it relies on changes.
Here is an example of my ...
3
votes
0
answers
1k
views
Prune command not working on Windows & M1/M2
I have a monorepo made following turborepo's documentation, on Linux machines it builds the entire monorepo and all the docker containers flawlessly but when it comes to either Windows (WSL2 on both ...
3
votes
0
answers
1k
views
How to use local-only dependencies in PNPM workspace
I have a general PNPM question regarding Monorepos. Let me describe a simplified problem statement:
Monorepo contains two packages: [email protected] and [email protected]
The foo package is a library which is ...
3
votes
1
answer
163
views
TSConfig paths and "Unsafe call of an `any` typed value" on imports
I have a method in a service e.g. -
// file some-service.ts
export const getKey = (key: string) => key;
and use it as follows with import alias -
import * as someService from '~/shared/services/...
2
votes
2
answers
16k
views
How to serve Vite development server behind an Nginx reverse proxy
I'm working on a Typescript monorepo using turborepo that holds multiple microservices (nextjs, expressjs, create-react-app).
each of these microservices is served in its own PORT.
In order to make ...
2
votes
1
answer
2k
views
How do I deploy an app in a monorepo (Turborepo), with local dependencies, as a Google Cloud Function?
I'm moving a project to a monorepo (Turborepo w/pnpm) and having trouble deploying my Google Cloud Functions. Normally I would simply use the gcloud CLI. For example:
call pnpm run build && ...
2
votes
1
answer
6k
views
How to add an internal package for types with Turborepo?
I've been trying to create an internal package for my Monorepo based on Turborepo. I am running Nuxt 3 with Tailwind. Now my Issue is that I am trying to create a custom package for types. I tried ...
2
votes
1
answer
1k
views
Deploying monorepo projects to AWS Lambda with dependencies
I have set up a Node.js (Typescript) based Monorepo, and I am using Turborepo as the tool to manage the Monorepo. I am using pnpm as my package manager.
All my main projects are present in the apps ...
2
votes
1
answer
2k
views
AWS CDK in monorepo packages - "This app contains no stacks"
I have a large typescript application, deployed with AWS CDK. The project is structured in a monorepo where each package represents a microservice on its own.
I'm trying to get away from the "...
2
votes
0
answers
84
views
Code block not rendering properly with docusaurus
Does anyone know of any incompatibilities between docusaurus when working with monorepo tools. I'm having issues getting code blocks to render properly in my docs, however the exact same code works ...
2
votes
0
answers
114
views
React use client directive with parceljs bundler
Parceljs is unable to deal with "use client" directive. I've a monorepo (pnpm workspaces + turborepo). apps/web is dependent on pkgs/ui that includes UI components. Since components are all ...
2
votes
2
answers
982
views
Turborepo React app fails to load Tailwind
I’ve created a monorepo with Turborepo that for now have 1 React Vite App, and tailwind-config package. And my problem for now is that my App is not loading tailwind at all.
Let me try to explain you ...
2
votes
0
answers
407
views
Jest in Turborepo with yarn workspaces: transformIgnorePatterns
I'm trying to target a package called oauth4webapi in my jest.config.ts file in a local turborepo package. The package I'm tryng to target is in the root node_modules folder, not the local one. Is ...
2
votes
1
answer
324
views
Turborepo says npm not installed
? Which package manager do you want to use?
npm (not installed)
pnpm
yarn (not installed)
? Which package manager do you want to use?
npm
pnpm
yarn (not installed)
2
votes
0
answers
472
views
Does Docker Compose Conflict with Turborepo Pipelines?
I have a turbo monorepo that I want to perform end-to-end tests on in a CI environment. All of my applications are containerized and some external services are hosted by container during development ...
2
votes
0
answers
361
views
I want to use turborepo in a project where I don't want to use TypeScript is this possible?
I searched and read the docs but couldn't find the exact solution I also search for template and boilerplate.
How to use turborepo without using typescript any comments about it guys?
I don't want to ...
2
votes
1
answer
823
views
Monorepo: (NextJS 13 + Typescript) Module parse failed
I'm trying to move a currently working nextjs 13 app to a single monorepo.
I basically created a new repo using npx create-turbo@latest and then moved my existing repo (lest call it "frontend&...
2
votes
0
answers
1k
views
how to get turborepo to run the 'deploy' command in every application folder that I have?
I have two applications nested in my /apps folder with the latest version of turborepo on a brand new project created this week.
I have created a 'deploy' command in the package.json of both ...
2
votes
0
answers
510
views
Javascript module imports takes too long
I've created up a nodejs mono-repo project using tuborepo and the kitchen-sink template.
Here I have some applications, the code that I am going to release, and some packages, basically are shared ...
2
votes
1
answer
998
views
Using Expo React Native in Monorepo without Yarn
I have been trying to setup a monorepo using turborepo. I want to have a Nextjs application along with a React Native application (using Expo).
I have come as far as getting everything to work using ...
1
vote
1
answer
313
views
How to disable Turborepo "Update available" message?
I get these message when I use Turborepo :
╭───────────────────────────────────────────────────────────────────────╮
│ │
│ ...
1
vote
1
answer
2k
views
Turborepo with 2 react apps and CircleCI CI/CD only run for changed app
I'm using Turborepo for my monorepo project, i have 2 react apps. How can i configure Turborepo and CircleCI (repos are on Github) so if i make changes to one project that pipeline is not going to run ...
1
vote
1
answer
887
views
ESlint packages not found in apps
I have a turborepo with a web app in the apps directory and an eslint-config-custom as a package.
eslint-config-custom has some dependencies on other eslint plugins. However, those are not found in ...
1
vote
2
answers
2k
views
How to reuse a css file in a monorepo
I am using Turborepo, and am wondering if there is a way that I can create a common css file and reuse it. For example, given the below architecture,
apps/
|- client/
|- index.tsx
packages/
|- ...
1
vote
2
answers
496
views
Tailwind setup not working on vercel-tuborepo with react
I was trying to setup tailwind css with my react monorepo created using vercel-turborepo
I simply used the example from vercel to setup monorepo with create-react-app then i tried copying the same ...
1
vote
1
answer
352
views
How to build Typescript workspaces with internal packages?
I have a monorepo that is utilizing PNPM workspaces. I've been working in development mode for some time now and following the turborepo guide. It says that my internal packages, the ones that I ...