Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[turborepo] Tasks in the pipeline always complete successfully #5098

Closed
vnva opened this issue May 25, 2023 · 2 comments
Closed

[turborepo] Tasks in the pipeline always complete successfully #5098

vnva opened this issue May 25, 2023 · 2 comments
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage

Comments

@vnva
Copy link

vnva commented May 25, 2023

What version of Turborepo are you using?

1.9.9

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Linux

Describe the Bug

With nodejs version 20.2.0, tasks in the pipeline always complete successfully. The same thing happens with eslint and in packages. At any error, the pipelining terminates successfully.

Log:

> build
> turbo run build

• Packages in scope: docs, eslint-config-custom, tsconfig, ui, web
• Running build in 5 packages
• Remote caching disabled
docs:build: cache miss, executing 807e0c7a16ea603f
web:build: cache miss, executing 51645d36093d8cd5
web:build: 
web:build: > web@1.0.0 build
web:build: > next build
web:build: 
docs:build: 
docs:build: > docs@1.0.0 build
docs:build: > next build
docs:build: 
web:build: - info Creating an optimized production build...
docs:build: - info Creating an optimized production build...
docs:build: - info Compiled successfully
docs:build: - info Linting and checking validity of types...
web:build: - info Compiled successfully
web:build: - info Linting and checking validity of types...
docs:build: Failed to compile.
docs:build: 
docs:build: ./app/page.tsx:4:9
docs:build: Type error: Type 'number' is not assignable to type 'string'.
docs:build: 
docs:build:   2 | 
docs:build:   3 | export default function Page() {
docs:build: > 4 |   const a: string = 1;
docs:build:     |         ^
docs:build:   5 | 
docs:build:   6 |   return (
docs:build:   7 |     <>
docs:build: npm ERR! Lifecycle script `build` failed with error: 
docs:build: npm ERR! Error: command failed 
docs:build: npm ERR!   in workspace: docs@1.0.0 
docs:build: npm ERR!   at location: /home/vnva/Projects/work/my-turborepo/apps/docs 
web:build: - info Collecting page data...
web:build: - info Generating static pages (0/3)
web:build: - info Generating static pages (3/3)
web:build: - info Finalizing page optimization...
web:build: 
web:build: Route (app)                                Size     First Load JS
web:build: ─ ○ /                                      742 B          77.8 kB
web:build: + First Load JS shared by all              77 kB
web:build:   ├ chunks/7fd0f9f1-5a083fab1aca0cd0.js    50.5 kB
web:build:   ├ chunks/9-4337614fd7041396.js           24.7 kB
web:build:   ├ chunks/main-app-cffaa53839f2cd62.js    211 B
web:build:   └ chunks/webpack-8074fabf81ca3fbd.js     1.61 kB
web:build: 
web:build: Route (pages)                              Size     First Load JS
web:build: ─ ○ /404                                   178 B          83.8 kB
web:build: + First Load JS shared by all              83.6 kB
web:build:   ├ chunks/main-ff72784f162fd151.js        81.8 kB
web:build:   ├ chunks/pages/_app-415a5670032b79f5.js  190 B
web:build:   └ chunks/webpack-8074fabf81ca3fbd.js     1.61 kB
web:build: 
web:build: ○  (Static)  automatically rendered as static HTML (uses no initial props)
web:build: 

 Tasks:    2 successful, 2 total
Cached:    0 cached, 2 total
  Time:    17.644s 

Expected Behavior

Pipeline should end with an error.

To Reproduce

Use Node.js 20.2.0

Initialize monorepo with:

npx create-turbo@latest

Make mistake in app

Run:

npm run build

Reproduction Repo

No response

@vnva vnva added area: turborepo kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels May 25, 2023
@mehulkar
Copy link
Contributor

mehulkar commented May 27, 2023

I can reproduce this with 1.9.9, 1.9.8, and 1.9.7. It looks like it happens even if I cd into the docs directory and run npm run build without turbo also, but I was not able to reproduce with an app created with npx create-next@13.4.4 (yet). I have a feeling this is an issue in Node or npm not exiting with the right exit code on error, rather than a turbo issue.

@mehulkar
Copy link
Contributor

mehulkar commented May 27, 2023

I've confirmed this is an issue with npm workspaces + node 20, I can reproduce it without turbo or next.js or anything: https://github.com/mehulkar/turbo-issue-5098. Looks like a similar issue has already been reported in npm/cli#6506 npm/cli#6399 as well, so I'm going to close this down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage
Projects
None yet
Development

No branches or pull requests

2 participants