Closed martinez-hugo closed 10 months ago
My main package.json
{
"name": "veille-360",
"version": "0.1.0",
"private": true,
"globalDotEnv": [".env"],
"scripts": {
"build": "turbo build",
"dev": "dotenv -- turbo dev",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"pipeline": {
"build": {
"dotEnv": [
".env.production.local",
".env.local",
".env.production",
".env"
]
},
"dev": {
"dotEnv": [
".env.production.local",
".env.local",
".env.production",
".env"
]
},
"test": {
"dotEnv": [
".env.production.local",
".env.local",
".env.production",
".env"
]
}
},
"workspaces": ["src", "emails-server", "data"],
"dependencies": {
"classnames": "^2.5.0",
"dotenv-cli": "latest"
},
"engines": {
"node": ">=20"
},
"devDependencies": {
"@biomejs/biome": "1.4.1"
},
"packageManager": "npm@10.2.5"
}
My src
package.json
{
"name": "src",
"version": "0.1.0",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@heroicons/react": "^2.1.1",
"@hookform/resolvers": "^3.3.2",
"@prisma/client": "^5.7.1",
"@radix-ui/react-accordion": "^1.1.2",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-scroll-area": "^1.0.5",
"@radix-ui/react-separator": "^1.0.3",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-toast": "^1.1.5",
"@react-email/button": "0.0.13",
"@react-email/components": "^0.0.12",
"@react-email/html": "0.0.7",
"@react-email/render": "^0.0.10",
"@react-email/tailwind": "0.0.13",
"@vercel/blob": "^0.16.1",
"@vercel/postgres": "^0.5.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"date-fns": "^3.0.6",
"emails-server": "*",
"geist": "^1.2.0",
"nanoid": "^5.0.4",
"next": "^14.0.4",
"postmark": "^4.0.2",
"react": "^18.2.0",
"react-day-picker": "^8.10.0",
"react-dom": "^18.2.0",
"react-email": "^1.10.0",
"react-hook-form": "^7.49.2",
"tailwind-merge": "^2.2.0",
"tailwindcss-animate": "^1.0.7",
"vercel": "^33.0.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18.2.46",
"@types/react-dom": "^18.2.18",
"@types/uuid": "^9.0.7",
"autoprefixer": "^10",
"depcheck": "^1.4.7",
"eslint": "^8",
"eslint-config-next": "^14.0.4",
"postcss": "^8",
"prettier": "3.1.1",
"prisma": "^5.7.1",
"tailwindcss": "^3",
"typescript": "^5"
},
"overrides": {
"@react-email/render": "^0.0.9"
}
}
Can you verify that the issue only comes when turbo
is used to invoke your scripts? i.e. instead of turbo dev --filter=src
run cd src; npm dev
Also, the repository you linked to is private. If this intentional and adding me as a contributor should let me view and help you debug the turbo
issue.
Given that this happens without turbo
in the mix this is probably an issue with the setup of the monorepo or your local machine. It could be Node version related or npm version / configuration.
Nothing immediately jumps out to me and I'm afraid I don't have the bandwidth to take a deeper look at your setup. If I misunderstood and this is an issue with turbo
then please reopen.
@chris-olszewski I check one thing that maybe we will help us
If I run any dev or build command on root folder of my repo, it doesn't work
But if i run npm run dev
on my src
package, it works but with one alert :
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.
What do you think about this ?
Which package manager are you using? I noticed that you have a yarn.lock
and see yarn run v1.22.19
in the logs on the sandbox, but you have npm
listed as a package manager and use npm run dev
in other places.
Can you try removing the pipeline definition in the primary package.json
, it's unnecessary since turbo.json
is present.
Verify canary release
Link to code that reproduces this issue
https://github.com/martinez-hugo/veille-360
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
turbo@1.11.3-canary.1
Describe the Bug
On my local Mac computer, when I try to build or run dev my project, I have this error for
src
package :and these error for
emails-server
packageExpected Behavior
Ability to build or run dev without erros
To Reproduce
A monorepo with 3 workspaces :
src
data
emails-server
monorepo managed with turbo
Additional context
Environment
@lareservetech:registry = "https://npm.pkg.github.com/" @LaReserveTech:registry = "https://npm.pkg.github.com/" @martinez-hugo:registry = "https://npm.pkg.github.com/" //npm.pkg.github.com/:_authToken = (protected) engine-strict = true
; node bin location = /usr/local/bin/node ; node version = v20.10.0 ; npm local prefix = /Users/hugomartinez/veille-360 ; npm version = 10.2.5 ; cwd = /Users/hugomartinez/veille-360 ; HOME = /Users/hugomartinez ; Run
npm config ls -l
to show all defaults.