0

I have turborepo set up with pnpm and I'm trying to start the react frontend of one of my clients with this command: npx turbo run start --filter=testclient

Here's the output from this command:

• Packages in scope: testclient
• Running start in 1 packages
testclient:start: cache bypass, force executing 4ef91202eb77e2b8
testclient:start: 
testclient:start: > testclient@0.0.1 start /Users/me/frontend/frontend-core/clients/testclient
testclient:start: > node node_modules/react-scripts/bin/react-scripts.js --max-old-space-size=4096 start
testclient:start: 
testclient:start: ℹ 「wds」: Project is running at http://192.168.0.54/
testclient:start: ℹ 「wds」: webpack output is served from 
testclient:start: ℹ 「wds」: Content not from webpack is served from /Users/me/frontend/frontend-core/clients/testclient/public
testclient:start: ℹ 「wds」: 404s will fallback to /
testclient:start: Starting the development server...
testclient:start: 

 Tasks:    1 successful, 1 total
Cached:    0 cached, 1 total
  Time:    2.339s

As you can see, turbo starts the development server without issues, but then it immediately exists instead of keeping the server running.

In my /turbo.json, I have start specified here:

{
  "$schema": "https://turborepo.org/schema.json",
  "pipeline": {
    "start": { "cache": false },
    ...

/pnpm-workspace.yaml:

packages:
  - 'packages/*'
  - 'clients/**'
  - '!**/tests/**'

/package.json:

{
  "private": true,
  "workspaces": [
    "clients/*",
    "packages/*"
  ],
  "scripts": {
    [ no "start" script here as only packages in '/clients' have that ]
    ...

/clients/testclient/package.json containing the "start" script:

{
  "name": "testclient",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-scripts/bin/react-scripts.js --max-old-space-size=4096 start",
    ...

I'm able to get turborepo to build without issues by running npx turbo run build --filter=testclient

Curiously, I am able to start the dev server by running npm start --prefix=clients/testclient, but the output looks different:

Compiled with warnings.

/Users/me/frontend/frontend-core/packages/frontend-core/dist/frontend-core.css (/Users/me/frontend/frontend-core/node_modules/.pnpm/css-loader@3.4.2_webpack@4.42.0/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!/Users/me/frontend/frontend-core/node_modules/.pnpm/postcss-loader@3.0.0/node_modules/postcss-loader/src??postcss!/Users/me/frontend/frontend-core/packages/frontend-core/dist/frontend-core.css)
Warning

(14:63200) end value has mixed support, consider using flex-end instead

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

Any idea why turborepo just exists as soon as the server starts, taking the server down with it?

usbToaster
  • 475
  • 1
  • 4
  • 13

0 Answers0