创建一个新的角度项目日志NPM警告:npm警告可选的跳过选择性依赖

时间:2019-08-24 11:01:19

标签: javascript node.js angular typescript npm

当我创建一个新的Angular项目时,我从NPM收到以下警告:

        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/webpack-dev-server/node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/watchpack/node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/karma/node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/@angular/compiler-cli/node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

它们似乎无关紧要,因为该项目可以与ng serve -o一起正常运行。有办法将其关闭吗?

这是我的ng --version结果:

            Angular CLI: 8.3.0-rc.0
            Node: 12.6.0
            OS: linux x64
            Angular: 8.2.2
            ... animations, common, compiler, compiler-cli, core, forms
            ... language-service, platform-browser, platform-browser-dynamic
            ... router

            Package                           Version
            -----------------------------------------------------------
            @angular-devkit/architect         0.802.2
            @angular-devkit/build-angular     0.802.2
            @angular-devkit/build-optimizer   0.802.2
            @angular-devkit/build-webpack     0.802.2
            @angular-devkit/core              8.2.2
            @angular-devkit/schematics        8.3.0-rc.0
            @angular/cdk                      8.1.3
            @angular/cli                      8.3.0-rc.0
            @angular/material                 8.1.3
            @ngtools/webpack                  8.2.2
            @schematics/angular               8.3.0-rc.0
            @schematics/update                0.803.0-rc.0
            rxjs                              6.4.0
            typescript                        3.5.3
            webpack                           4.38.0

1 个答案:

答案 0 :(得分:1)

您可以尝试将以下选项添加到npm install命令:

from scrapy import Request headers = { 'authority': 'health.usnews.com', 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36', } url = "https://health.usnews.com/doctors/specialists-index" req = Request(url, headers=headers) fetch(req)