fetch-cookie
fetch-cookie copied to clipboard
Post-install script prevents installation
I just leave this log here, but the type definitions prevent installation in my environment. TS config also included:
➜ fp-ra-client git:(main) ✗ yarn add https://github.com/leehambley/fetch-cookie --ignore-scripts
yarn add v1.22.19
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "ts-standard > @typescript-eslint/[email protected]" has unmet peer dependency "@typescript-eslint/parser@^4.0.0".
[4/4] 🔨 Building fresh packages...
success Saved lockfile.
$ npm run build && npm run type-declarations
> [email protected] build
> esbuild src/*.ts --format=esm --outdir=esm && esbuild src/*.ts --format=cjs --outdir=cjs
esm/index.js 7.3kb
cjs/index.js 8.4kb
> [email protected] type-declarations
> tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --outDir esm && cat esm/index.d.ts | sed 's/^export default /export = /' > cjs/index.d.ts
src/index.ts:284:33 - error TS2345: Argument of type '{ (input: RequestInfo, init?: FetchCookieInit<RequestInit> | undefined): Promise<Response>; toughCookie: typeof import("/Users/leehambley/Library/Caches/Yarn/v6/.tmp/c81626f186160b75360efa5a0bd19eb6.f90f607aeb4918327abc84fc675b337482b2abb6.prepare/node_modules/@types/tough-cookie/index"); }' is not assignable to parameter of type '(input: URL | RequestInfo, init?: RequestInit | undefined) => Promise<Response>'.
Types of parameters 'input' and 'input' are incompatible.
Type 'URL | RequestInfo' is not assignable to type 'RequestInfo'.
Type 'URL' is not assignable to type 'RequestInfo'.
284 return await handleRedirect(fetchCookieWrapper, originalInit, response)
~~~~~~~~~~~~~~~~~~
Found 1 error in src/index.ts:284
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
{
"compilerOptions": {
"esModuleInterop": true
}
}
Hey! Can you try installing from npm instead? (yarn add fetch-cookie
)
The latest version should be up-to-date with the main branch and because it's prebuilt I believe you shouldn't hit any of those issues with transpiling
We don't use NPM, we only are using Yarn. Thanks
On Thu, Nov 24, 2022, 4:31 PM Val @.***> wrote:
Hey! Can you try installing from npm instead? (yarn add fetch-cookie)
The latest version should be up-to-date with the main branch and because it's prebuilt I believe you shouldn't hit any of those issues with transpiling
— Reply to this email directly, view it on GitHub https://github.com/valeriangalliat/fetch-cookie/issues/76#issuecomment-1326597703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEUCBQK7SW5BCVPX7LTTTWJ6C6NANCNFSM6AAAAAASKAFRIQ . You are receiving this because you authored the thread.Message ID: @.***>
Sorry, sent that ☝️ from my phone without understanding what you were suggesting; I need to install from Git because of my own fork.
The issue seem to affect users installing starknet-js
via yarn too as it depends on github branch currently. Although error messages are not clear. Installing via npm works fine though.