Skip to content
New issue

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

Update dev dependency "nyc" #9409

Closed
mikeharder opened this issue Jun 9, 2020 · 2 comments
Closed

Update dev dependency "nyc" #9409

mikeharder opened this issue Jun 9, 2020 · 2 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. EngSys This issue is impacting the engineering system.

Comments

@mikeharder
Copy link
Member

Our repo is currently using nyc@^14.0.0. A new major version nyc@15.0.0 was released on 12/20/2019:

https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md#1500-2019-12-20

I attempted to upgrade, and it mostly worked but tests failed on Windows with the following error:

Error: Cannot find module 'node-preload.js'

I believe this due to a bug in pnpm which impacts nyc: istanbuljs/nyc#1308. I tried the workaround suggested in that issue of adding --use-spawn-wrap to the nyc command line, but this failed on all platforms with the following error (when running tests for core-http):

Executing: "cross-env TS_NODE_FILES=true nyc --use-spawn-wrap mocha --require ts-node/register --timeout 50000 --reporter ../../../common/tools/mocha-multi-reporter.js --colors --exclude \"test/**/*.browser.ts\" \"test/**/*.ts\""

⨯ Unable to compile TypeScript:
.typings/karma.d.ts:1:24 - error TS7016: Could not find a declaration file for module 'karma'. 'sdk/core/core-http/node_modules/karma/lib/index.js' implicitly has an 'any' type.
  Try `npm install @types/karma` if it exists or add a new declaration (.d.ts) file containing `declare module 'karma';`

1 import * as karma from "karma";

I tried adding a reference to @types/karma as suggested, but tests still failed to load the types:

Executing: "cross-env TS_NODE_FILES=true nyc --use-spawn-wrap mocha --require ts-node/register --timeout 50000 --reporter ../../../common/tools/mocha-multi-reporter.js --colors --exclude \"test/**/*.browser.ts\" \"test/**/*.ts\""

Unable to require file: .typings\karma.d.ts
This is usually the result of a faulty configuration or import. Make sure there is a `.js`, `.json` or other executable extension with loader attached before `ts-node` available.

Draft PR: #9310

@ghost ghost added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 9, 2020
@ramya-rao-a ramya-rao-a added the Client This issue points to a problem in the data-plane of the library. label Jun 9, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 9, 2020
@ramya-rao-a ramya-rao-a added this to the Backlog milestone Jun 9, 2020
@jeremymeng jeremymeng added the EngSys This issue is impacting the engineering system. label Aug 24, 2021
@ramya-rao-a ramya-rao-a self-assigned this Dec 11, 2021
@jeremymeng
Copy link
Contributor

Closing in favor of bot-auto-filed issue #19232

@ramya-rao-a
Copy link
Contributor

This is now completed in #19248

@xirzec xirzec removed this from the Backlog milestone May 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. EngSys This issue is impacting the engineering system.
Projects
None yet
Development

No branches or pull requests

4 participants