Skip to content

I execute the " ng add @angular/pwa" command, and do not automatically create relevant files of service worker after successful installation #11914

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

Closed
JinZhang-96 opened this issue Aug 16, 2018 · 4 comments

Comments

@JinZhang-96
Copy link

Bug Report or Feature Request (mark with an x)

I execute the " ng add @angular/pwa" command, and do not automatically create relevant files of service worker after successful installation

Command (mark with an x)

ng add @angular/pwa

Versions

node -v
v10.6.0

npm -v
6.1.0

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | |
/ ___ | | | | (
| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/

Angular CLI: 6.0.8
Node: 10.6.0
OS: win32 x64
Angular: 6.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package Version

@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cdk 6.4.5
@angular/cli 6.0.8
@angular/pwa 0.7.3
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.2
typescript 2.7.2
webpack 4.8.3

windows version
windows 10 家庭版

Repro steps

excute command after

ng add @angular/pwa
Installing packages for tooling via npm.

  • @angular/[email protected]
    updated 1 package in 8.534s
    Installed packages for tooling via npm.
    Invalid rule result: Function().

it say "Invalid rule result: Function()."

Is this reason?

The log given by the failure

Desired functionality

Mention any other details that might be useful

@enniob
Copy link

enniob commented Aug 16, 2018

I'm having the same issue. I made a new app using

`
ng new MyPWA

ng add @angular/pwa
`
and I get the following error:

Installing packages for tooling via npm.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  • @angular/[email protected]
    added 5 packages from 2 contributors in 19.266s
    [!] 14 vulnerabilities found [26695 packages audited]
    Severity: 9 low | 5 high
    Run npm audit for more detail

Installed packages for tooling via npm.
Invalid rule result: Function().

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | |
/ ___ | | | | (
| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/

Angular CLI: 6.0.8
Node: 8.11.3
OS: win32 x64
Angular: 6.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 6.0.8
@angular/pwa 0.7.3
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.2
typescript 2.7.2
webpack 4.8.3

@enniob
Copy link

enniob commented Aug 16, 2018

This is fixed with the latest cli update :). I just tested and its working fine

@ngbot ngbot bot added this to the needsTriage milestone Aug 17, 2018
@clydin
Copy link
Member

clydin commented Aug 20, 2018

Duplicate of #11663

@clydin clydin marked this as a duplicate of #11663 Aug 20, 2018
@clydin clydin closed this as completed Aug 20, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants