question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the bug

When I try to build my typescript project in “prod” mode with tsc, I get an error regarding the package @crawlee/browser-pool/puppeteer

Error :

node_modules/@crawlee/browser-pool/puppeteer/puppeteer-controller.d.ts:2:28 - error TS2307: Cannot find module './puppeteer-proxy-per-page' or its corresponding type declarations.

To Reproduce

npx crawlee create my-project cd my-project npm run build

System information:

  • OS: MacOS
  • Node.js 16
  • Crawlee 3.0.0

Package.json

{
    "name": "my-project",
    "type": "module",
    "main": "dist/main.js",
    "dependencies": {
        "crawlee": "3.0.0"
    },
    "devDependencies": {
        "@apify/tsconfig": "^0.1.0",
        "ts-node": "^10.8.0",
        "typescript": "^4.7.4"
    },
    "scripts": {
        "start": "npm run start:dev",
        "start:prod": "node dist/main.js",
        "start:dev": "ts-node-esm -T src/main.ts",
        "build": "tsc"
    }
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
B4nancommented, Jul 18, 2022

Thanks for the report, got it reproduced. As a workaround you can put "skipLibCheck": true to your compiler options in tsconfig.json.

0reactions
B4nancommented, Jul 22, 2022

The issue is already addressed in #1404, we just need to make the e2e tests work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I'm getting this error on build using tsc - node.js - Stack Overflow
You have reinstalled your modules and some type errors appeared.Find the the code where the types are not compatible and fix it. This...
Read more >
4.8 regression with `tsc --build`: error correctly reported, then ...
json correctly fails with an error, but running the same command again exits 0 with no output. Note that in this case, the...
Read more >
Stopping a TypeScript Build When Errors Are Found
This lesson shows how to configure your .tsconfig with "noEmitOnError" so that no files are output if tsc reports an error.
Read more >
Avoid TypeScript errors in your project by using the TypeScript ...
Create a task on VSCode to watch for errors · Open the command palette (Cmd+Shift+P) or (Ctrl+Shift+P) . · Select Tasks: Configure Task...
Read more >
TypeScript Compiling with Visual Studio Code
This shows you a picker with the available build tasks. Select TypeScript tsc: build, which generates the following tasks.json file in a .vscode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found