puppeteer - npm run build 上的 puppeteer 警告...重要吗?
问题描述
我是 npm 的新手,只是在 macOS Catalina 上安装 puppeteer。这似乎是提出这个问题的最佳场所。
cd
进入 puppeteer 目录并运行后,npm run build
我得到以下输出:
> puppeteer@8.0.0-post build
> npm run tsc && npm run generate-d-ts
> puppeteer@8.0.0-post tsc
> npm run clean-lib && tsc --version && npm run tsc-cjs && npm run tsc-esm
> puppeteer@8.0.0-post clean-lib
> rm -rf lib
Version 4.3.2
> puppeteer@8.0.0-post tsc-cjs
> tsc -b src/tsconfig.cjs.json
> puppeteer@8.0.0-post tsc-esm
> tsc -b src/tsconfig.esm.json
> puppeteer@8.0.0-post generate-d-ts
> api-extractor run --local --verbose
api-extractor 7.13.1 - https://api-extractor.com/
Using configuration from ./api-extractor.json
Analysis will use the bundled TypeScript version 4.1.5
*** The target project appears to use TypeScript 4.3.2 which is newer than the bundled compiler engine; consider upgrading API Extractor.
Writing: /Users/john/Documents/GitHub/puppeteer/temp/puppeteer.api.json
Writing package typings: /Users/john/Documents/GitHub/puppeteer/lib/types.d.ts
然后我假设一整串警告与上面提到的不同版本的 TypeScript 有关。
这是我应该关心的问题吗?我的安装有问题吗?
Warning: node_modules/devtools-protocol/types/protocol-mapping.d.ts:443:86 - (tsdoc-code-span-missing-delimiter) The code span is missing its closing backtick
Warning: node_modules/devtools-protocol/types/protocol.d.ts:4117:73 - (tsdoc-undefined-tag) The TSDoc tag "@media" is not defined in this configuration
Warning: node_modules/devtools-protocol/types/protocol.d.ts:4118:32 - (tsdoc-undefined-tag) The TSDoc tag "@import" is not defined in this configuration
Warning: node_modules/devtools-protocol/types/protocol.d.ts:4128:37 - (tsdoc-at-sign-in-word) The "@" character looks like part of a TSDoc tag; use a backslash to escape it
Warning: node_modules/devtools-protocol/types/protocol.d.ts:4128:47 - (tsdoc-characters-after-block-tag) The token "@import" looks like a TSDoc tag but contains an invalid character ")"; if it is not a tag, use a backslash to escape the "@"
Warning: node_modules/devtools-protocol/types/protocol.d.ts:7926:53 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:7926:68 - (tsdoc-malformed-html-name) Invalid HTML element: An HTML name must be an ASCII letter followed by zero or more letters, digits, or hyphens
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9188:68 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9188:53 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9294:68 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9294:53 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9367:32 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9367:53 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9873:68 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:9873:53 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
Warning: node_modules/devtools-protocol/types/protocol.d.ts:11026:99 - (tsdoc-code-span-missing-delimiter) The code span is missing its closing backtick
Warning: node_modules/devtools-protocol/types/protocol.d.ts:11027:24 - (tsdoc-code-span-missing-delimiter) The code span is missing its closing backtick
Warning: node_modules/devtools-protocol/types/protocol.d.ts:11229:63 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:11230:63 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:11594:97 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:11594:50 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
Warning: node_modules/devtools-protocol/types/protocol.d.ts:12564:86 - (tsdoc-code-span-missing-delimiter) The code span is missing its closing backtick
Warning: node_modules/devtools-protocol/types/protocol.d.ts:14142:32 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:14142:53 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: node_modules/devtools-protocol/types/protocol.d.ts:14258:68 - (tsdoc-unnecessary-backslash) A backslash can only be used to escape a punctuation character
Warning: src/common/Browser.ts:183:3 - (ae-forgotten-export) The symbol "BrowserCloseCallback" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/Browser.ts:554:1 - (ae-missing-release-tag) "BrowserContextEmittedEvents" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/Browser.ts:608:1 - (ae-missing-release-tag) "BrowserContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/Connection.ts:47:3 - (ae-forgotten-export) The symbol "ConnectionTransport" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/Connection.ts:53:3 - (ae-forgotten-export) The symbol "ConnectionCallback" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/Connection.ts:70:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Connection.ts:70:13 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
Warning: src/common/Connection.ts:71:27 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
Warning: src/common/Connection.ts:71:15 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
Warning: src/common/Connection.ts:170:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Connection.ts:170:13 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'
Warning: src/common/Connection.ts:171:36 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
Warning: src/common/Connection.ts:171:37 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
Warning: src/common/Connection.ts:171:24 - (tsdoc-malformed-html-name) Invalid HTML element: Expecting an HTML name
Warning: src/common/Connection.ts:171:15 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"
Warning: src/common/Connection.ts:245:3 - (ae-forgotten-export) The symbol "ProtocolMapping" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/Connection.ts:277:3 - (ae-forgotten-export) The symbol "CDPSessionOnMessageObject" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/ConsoleMessage.ts:42:1 - (ae-missing-release-tag) "ConsoleMessageType" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/Coverage.ts:109:3 - (ae-forgotten-export) The symbol "JSCoverage" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/Coverage.ts:113:3 - (ae-forgotten-export) The symbol "CSSCoverage" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/DeviceDescriptors.ts:1034:1 - (ae-missing-release-tag) "DevicesMap" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/DeviceDescriptors.ts:1035:3 - (ae-forgotten-export) The symbol "Device" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/DeviceDescriptors.ts:1038:7 - (ae-missing-release-tag) "devicesMap" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/Dialog.ts:42:1 - (ae-missing-release-tag) "Dialog" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/Errors.ts:37:1 - (ae-forgotten-export) The symbol "CustomError" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/Errors.ts:37:1 - (ae-missing-release-tag) "PuppeteerErrors" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/Errors.ts:39:14 - (ae-missing-release-tag) "puppeteerErrors" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/EvalTypes.ts:24:1 - (ae-missing-release-tag) "UnwrapPromiseLike" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/EventEmitter.ts:11:3 - (ae-forgotten-export) The symbol "EventType" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/EventEmitter.ts:11:3 - (ae-forgotten-export) The symbol "Handler" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/EventEmitter.ts:38:1 - (ae-incompatible-release-tags) The symbol "EventEmitter" is marked as @public, but its signature references "CommonEventEmitter" which is marked as @internal
Warning: src/common/ExecutionContext.ts:26:14 - (ae-missing-release-tag) "EVALUATION_SCRIPT_URL" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/ExecutionContext.ts:36:7 - (tsdoc-reference-missing-dot) Expecting a period before the next component of a declaration reference
Warning: src/common/ExecutionContext.ts:129:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/ExecutionContext.ts:130:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/ExecutionContext.ts:181:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/ExecutionContext.ts:182:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/ExecutionContext.ts:347:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/FileChooser.ts:38:1 - (ae-missing-release-tag) "FileChooser" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/JSHandle.ts:36:1 - (ae-missing-release-tag) "BoxModel" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/LifecycleWatcher.ts:30:1 - (ae-missing-release-tag) "PuppeteerLifeCycleEvent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/LifecycleWatcher.ts:55:3 - (ae-forgotten-export) The symbol "ProtocolLifeCycleEvent" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/LifecycleWatcher.ts:60:3 - (ae-forgotten-export) The symbol "PuppeteerEventListener" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/NetworkManager.ts:45:1 - (ae-missing-release-tag) "InternalNetworkConditions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/Page.ts:286:34 - (tsdoc-characters-after-inline-tag) The character "." cannot appear after the TSDoc tag name; expecting a space
Warning: src/common/Page.ts:286:63 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag
Warning: src/common/Page.ts:983:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Page.ts:986:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Page.ts:989:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Page.ts:1416:9 - (ae-forgotten-export) The symbol "MediaFeature" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/Page.ts:1464:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Page.ts:1465:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Page.ts:1466:6 - (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
Warning: src/common/Puppeteer.ts:42:1 - (ae-missing-release-tag) "ConnectOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
Warning: src/common/WebWorker.ts:72:3 - (ae-forgotten-export) The symbol "ConsoleAPICalledCallback" needs to be exported by the entry point api-docs-entry.d.ts
Warning: src/common/WebWorker.ts:72:3 - (ae-forgotten-export) The symbol "ExceptionThrownCallback" needs to be exported by the entry point api-docs-entry.d.ts
iMac191:puppeteer john$ npm outdated
npm outdated
Package Current Wanted Latest Location Depended by
@commitlint/cli 11.0.0 11.0.0 12.1.4 node_modules/@commitlint/cli puppeteer
@commitlint/config-conventional 11.0.0 11.0.0 12.1.4 node_modules/@commitlint/config-conventional puppeteer
@microsoft/api-documenter 7.12.7 7.13.12 7.13.12 node_modules/@microsoft/api-documenter puppeteer
@microsoft/api-extractor 7.13.1 7.15.2 7.15.2 node_modules/@microsoft/api-extractor puppeteer
@types/debug 0.0.31 0.0.31 4.1.5 node_modules/@types/debug puppeteer
@types/mocha 7.0.2 7.0.2 8.2.2 node_modules/@types/mocha puppeteer
@types/node 14.14.31 14.17.1 15.6.1 node_modules/@types/node puppeteer
@types/rimraf 2.0.4 2.0.4 3.0.0 node_modules/@types/rimraf puppeteer
@types/sinon 9.0.10 9.0.11 10.0.1 node_modules/@types/sinon puppeteer
@types/tar-fs 1.16.3 1.16.3 2.0.0 node_modules/@types/tar-fs puppeteer
@types/ws 7.4.0 7.4.4 7.4.4 node_modules/@types/ws puppeteer
@typescript-eslint/eslint-plugin 4.15.2 4.26.0 4.26.0 node_modules/@typescript-eslint/eslint-plugin puppeteer
@typescript-eslint/parser 4.15.2 4.26.0 4.26.0 node_modules/@typescript-eslint/parser puppeteer
@web/test-runner 0.12.15 0.12.20 0.13.5 node_modules/@web/test-runner puppeteer
commonmark 0.28.1 0.28.1 0.29.3 node_modules/commonmark puppeteer
devtools-protocol 0.0.854822 0.0.854822 0.0.887728 node_modules/devtools-protocol puppeteer
eslint 7.20.0 7.27.0 7.27.0 node_modules/eslint puppeteer
eslint-config-prettier 6.15.0 6.15.0 8.3.0 node_modules/eslint-config-prettier puppeteer
eslint-plugin-import 2.22.1 2.23.4 2.23.4 node_modules/eslint-plugin-import puppeteer
eslint-plugin-mocha 8.0.0 8.2.0 9.0.0 node_modules/eslint-plugin-mocha puppeteer
eslint-plugin-prettier 3.3.1 3.4.0 3.4.0 node_modules/eslint-plugin-prettier puppeteer
eslint-plugin-unicorn 22.0.0 22.0.0 32.0.1 node_modules/eslint-plugin-unicorn puppeteer
expect 25.5.0 25.5.0 27.0.2 node_modules/expect puppeteer
husky 4.3.8 4.3.8 6.0.0 node_modules/husky puppeteer
jpeg-js 0.3.7 0.3.7 0.4.3 node_modules/jpeg-js puppeteer
mocha 8.3.0 8.4.0 8.4.0 node_modules/mocha puppeteer
pixelmatch 4.0.2 4.0.2 5.2.1 node_modules/pixelmatch puppeteer
pkg-dir 4.2.0 4.2.0 5.0.0 node_modules/pkg-dir puppeteer
pngjs 5.0.0 5.0.0 6.0.0 node_modules/pngjs puppeteer
prettier 2.2.1 2.3.0 2.3.0 node_modules/prettier puppeteer
puppeteer-extra-plugin-stealth 2.7.5 2.7.8 2.7.8 node_modules/puppeteer-extra-plugin-stealth puppeteer
sinon 9.2.4 9.2.4 11.1.1 node_modules/sinon puppeteer
standard-version 9.1.1 9.3.0 9.3.0 node_modules/standard-version puppeteer
ts-node 9.1.1 9.1.1 10.0.0 node_modules/ts-node puppeteer
解决方案
推荐阅读
- firefox - WebGL Firefox Profiler 解读
- python - 深度神经网络内存不足
- python-3.x - 如何使用 python 建立 TLS 连接?
- java - IntellijIDEA 打开时,Gluon SceneBuilder 不会打开 FXML 文件
- azure - 如何删除 Azure 中不存在的 VM
- python - 当 n_components 为 None 时如何解释 Scikit-learn 的 PCA?
- python - 如何从 svg 字节流渲染 svg 图像
- vue.js - Parcel - Babel - Vue - 错误:找不到模块`.../.../img.svg`
- single-sign-on - Keycloak 如何使用 AdminURL 实现单点登出
- javascript - 如何使用 map() 为组件传递 ref