Skip to content

TypeScript browser bundle has webpack warning #6903

@nickserv

Description

@nickserv

Environments:

  • Prettier Version: 1.19.0 and 1.19.1
  • Running Prettier via: Browser API
  • Runtime: webpack 4.41.2
  • Operating System: macOS

Steps to reproduce:

import "prettier/parser-typescript";

Expected behavior:
Bundle continues to compile without warnings.

Actual behavior:

WARNING in ./node_modules/prettier/parser-typescript.js
Module not found: Error: Can't resolve '@microsoft/typescript-etw' in '/Users/nick/Repos/prettier-chrome-extension/node_modules/prettier'
 @ ./node_modules/prettier/parser-typescript.js
 @ ./src/content/parsers.js
 @ ./src/content/github.js
 @ ./src/content/extension.js
 @ ./src/content/index.js

Oddly enough, the parser continues to work properly. However the error is confusing and may cause potential issues as typescript-etw only supports running on Windows natively, and this version of the parser only supports running in web browsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.type:infraIssues about CI, publishing to npm, or similar

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions