We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug When I run npm run build the compiler throw an error.
npm run build
Using npm@8.19.3 and node@16.19.0
npm@8.19.3
node@16.19.0
To Reproduce Clone the repository Install using PUPPETEER_PRODUCT=chrome npm install Run npm run build
PUPPETEER_PRODUCT=chrome npm install
Expected behavior Project compile
Desktop (please complete the following information):
Additional context Log:
> cloud-proxy@2.1.1 build > tsc node_modules/got/dist/source/core/index.d.ts:12:15 - error TS1005: ',' expected. 12 import { type PlainResponse, type Response } from './response.js'; ~~~~~~~~~~~~~ node_modules/got/dist/source/core/index.d.ts:12:35 - error TS1005: ',' expected. 12 import { type PlainResponse, type Response } from './response.js'; ~~~~~~~~ node_modules/got/dist/source/core/options.d.ts:21:29 - error TS1005: ',' expected. 21 import http2wrapper, { type ClientHttp2Session } from 'http2-wrapper'; ~~~~~~~~~~~~~~~~~~ Found 3 errors.
The text was updated successfully, but these errors were encountered:
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+.
package.json
3.9.7
4.5+
This is because import type syntax was introduced in TS 3.8:
import type
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:
@types/node
npm install --save-dev @types/node@latest
After this you can build the project without errors. @LoboMetalurgico
Sorry, something went wrong.
No branches or pull requests
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
Run
npm run build
Expected behavior
Project compile
Desktop (please complete the following information):
Additional context
Log:
The text was updated successfully, but these errors were encountered: