nodejs-datastore icon indicating copy to clipboard operation
nodejs-datastore copied to clipboard

`npm install` fails in the cloned repository.

Open malt03 opened this issue 1 year ago • 2 comments

The problem seems to be that @types/cacheable-request depends on "@types/responselike": "*" and therefore refers to 3.0.0 when it should refer to 1.0.0. I suggest that package-lock.json be included in the repository.

Environment details

  • OS: macOS 12.4
  • Node.js version: 16.14.2
  • npm version: 8.5.0
  • @google-cloud/datastore version: main branch (386b9c7)

Steps to reproduce

git clone https://github.com/googleapis/nodejs-datastore.git
cd nodejs-datastore
npm install

All Logs

% git clone https://github.com/googleapis/nodejs-datastore.git
Cloning into 'nodejs-datastore'...
remote: Enumerating objects: 5099, done.
remote: Counting objects: 100% (67/67), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 5099 (delta 27), reused 42 (delta 19), pack-reused 5032
Receiving objects: 100% (5099/5099), 3.53 MiB | 1.34 MiB/s, done.
Resolving deltas: 100% (3375/3375), done.

% cd nodejs-datastore/

% npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition. responselike provides its own type definitions, so you do not need this installed.

> @google-cloud/[email protected] prepare
> npm run compile-protos && npm run compile


> @google-cloud/[email protected] compile-protos
> compileProtos src


> @google-cloud/[email protected] precompile
> gts clean

version: 16
Removing build ...

> @google-cloud/[email protected] compile
> tsc -p . && cp -r proto* build/ && cp -r system-test/data build/system-test

node_modules/@types/cacheable-request/index.d.ts:26:42 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

26         cb?: (response: ServerResponse | ResponseLike) => void
                                            ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:77:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

77             listener: (response: ServerResponse | ResponseLike) => void
                                                     ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:81:69 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

81         on(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
                                                                       ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:84:71 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

84         once(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
                                                                         ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:89:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

89             listener: (response: ServerResponse | ResponseLike) => void
                                                     ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:95:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

95             listener: (response: ServerResponse | ResponseLike) => void
                                                     ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:104:51 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

104             listener: (response: ServerResponse | ResponseLike) => void
                                                      ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:108:70 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

108         off(event: 'response', listener: (response: ServerResponse | ResponseLike) => void): this;
                                                                         ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:112:73 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

112         listeners(event: 'response'): Array<(response: ServerResponse | ResponseLike) => void>;
                                                                            ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:115:76 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

115         rawListeners(event: 'response'): Array<(response: ServerResponse | ResponseLike) => void>;
                                                                               ~~~~~~~~~~~~

node_modules/@types/cacheable-request/index.d.ts:118:60 - error TS2709: Cannot use namespace 'ResponseLike' as a type.

118         emit(event: 'response', response: ServerResponse | ResponseLike): boolean;
                                                               ~~~~~~~~~~~~


Found 11 errors in the same file, starting at: node_modules/@types/cacheable-request/index.d.ts:26

npm ERR! code 1
npm ERR! path /Users/malt03/Documents/nodejs-datastore
npm ERR! command failed
npm ERR! command sh -c npm run compile-protos && npm run compile

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/malt03/.npm/_logs/2022-09-07T13_12_52_422Z-debug-0.log

malt03 avatar Sep 07 '22 13:09 malt03

Hi there — I think we're seeing a bug from one of the related dev dependencies, linkinator. There's a similar issue reported here: https://github.com/JustinBeckwith/linkinator/pull/519 cc: @bcoe for Node.js-wide visibility.

meredithslota avatar Sep 17 '22 00:09 meredithslota

Actually, adding @alexander-fenster who originally filed that issue with linkinator.

meredithslota avatar Sep 17 '22 00:09 meredithslota

@meredithslota @alexander-fenster Any updates?

malt03 avatar Nov 01 '22 05:11 malt03