Open LoboMetalurgico opened 1 year ago
Hello! Having the same problem. For everybody who is searching the solution.
First, right now package.json
contains typescript dependency of version 3.9.7
and one of the project dependencies requires Typescript 4.5+
.
This is because import type
syntax was introduced in TS 3.8:
import type { SomeThing } from "....";
However, type modifiers on import names were introduced in TS 4.5:
import { someFunc, type BaseType } from ".....";
So the first thing you need to do is updating your Typescript version:
npm install --save-dev typescript@4.5
Then a couple of other errors will appear, like:
node_modules/cacheable-request/dist/types.d.ts:5:72 - error TS2307: Cannot find module 'node:http' or its corresponding type declarations.
5 import { request, RequestOptions, ClientRequest, ServerResponse } from 'node:http';
Update yours @types/node
:
npm install --save-dev @types/node@latest
After this you can build the project without errors. @LoboMetalurgico
Describe the bug When I run
npm run build
the compiler throw an error.Using
npm@8.19.3
andnode@16.19.0
To Reproduce Clone the repository Install using
PUPPETEER_PRODUCT=chrome npm install
Runnpm run build
Expected behavior Project compile
Desktop (please complete the following information):
Additional context Log: