You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
serviceWorker = true fails to find @angular/service-worker with yarn workspaces #8300
Use yarn workspaces, set serviceWorker = true in angular-cli.json.
The log given by the failure.
Your project is configured with serviceWorker = true, but @angular/service-worker
is not installed. Run npm install --save-dev @angular/service-worker
and try again, or run ng set apps.0.serviceWorker=false in your .angular-cli.json.
Desired functionality.
The error shouldn't be fatal for an undetected service worker module. It should probably be a warning and able to be disabled similar to the TypeScript warnings for incorrect versions.
Mention any other details that might be useful.
Reacted by Andrei Voicu, JZ Song, Kyle Spraggs, Kevin Smets and Bipon Biswas
this is because these 2 lines:
const nodeModules = path.resolve(projectRoot, 'node_modules');
const swModule = path.resolve(nodeModules, '@angular/service-worker');
currently i'm using yarn workspace and my @angular/service-worker is in a parrent folder's nodeModules.
should change the logic to find node_modules in parents folders
Activity
metasong commentedon Dec 7, 2017
yes, meet this problem too.
this is because these 2 lines:
const nodeModules = path.resolve(projectRoot, 'node_modules');
const swModule = path.resolve(nodeModules, '@angular/service-worker');
currently i'm using yarn workspace and my @angular/service-worker is in a parrent folder's nodeModules.
should change the logic to find node_modules in parents folders
fix(@angular/cli): Allow service-workers package to be installed in p…
fix(@angular/cli): Allow service-workers package to be installed in p…
fix(@angular/cli): Allow service-workers package to be installed in p…
fix(@angular/cli): Allow service-workers package to be installed in p…
angular-automatic-lock-bot commentedon Sep 7, 2019
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.
fix(@angular/cli): Allow service-workers package to be installed in p…