KingDarBoja / example-angular-ng-toolkit

Sample angular 8 app using latest ng-toolkit packages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fsEvents warnings when building the app on a non mac os

HMubaireek opened this issue · comments

npm run build:prod

I get these warnings when I run npm run build:prod

WARNING in ./node_modules/@angular-devkit/core/node/experimental/jobs/job-registry.js 45:20-41
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/@angular-devkit/core/node/index.js
 @ ./node_modules/@angular-devkit/schematics/src/sink/dryrun.js
 @ ./node_modules/@angular-devkit/schematics/src/index.js
 @ ./node_modules/@schematics/angular/utility/project-targets.js
 @ ./prerender.ts

WARNING in ./node_modules/chokidar/lib/fsevents-handler.js
Module not found: Error: Can't resolve 'fsevents' in '/home/h/Repositories/SandBox/example-angular-ng-toolkit/node_modules/chokidar/lib'
 @ ./node_modules/chokidar/lib/fsevents-handler.js
 @ ./node_modules/chokidar/index.js
 @ ./node_modules/@angular-devkit/core/node/host.js
 @ ./node_modules/@angular-devkit/core/node/index.js
 @ ./node_modules/@angular-devkit/schematics/src/sink/dryrun.js
 @ ./node_modules/@angular-devkit/schematics/src/index.js
 @ ./node_modules/@schematics/angular/utility/project-targets.js
 @ ./prerender.ts

WARNING in ./node_modules/@angular-devkit/core/node/resolve.js 89:57-75
require.extensions is not supported by webpack. Use a loader instead.
 @ ./node_modules/@angular-devkit/core/node/experimental/jobs/job-registry.js 12:18-42
 @ ./node_modules/@angular-devkit/core/node/index.js
 @ ./node_modules/@angular-devkit/schematics/src/sink/dryrun.js
 @ ./node_modules/@angular-devkit/schematics/src/index.js
 @ ./node_modules/@schematics/angular/utility/project-targets.js
 @ ./prerender.ts

I'm running the app on linux machine.

@HMubaireek Sorry for the delay, was checking my package.json scripts against the one provided at the official universal package and there isn't anything different that triggers those warnings.

Still, the app will run without problems :)

Cheers!

@KingDarBoja Thanks for the follow up. Yes, it runs without issues but you know we hate those warnings :)

@HMubaireek Yeah, me too, I am getting those too but looks like it is caused by some Angular and Angular Universal packages.

Also, I updated my scripts to stay updated with upcoming release of the Angular Universal v9.

As soon as I get some free time, I will update the ng-toolkit packages too to ensure proper functionality.

Also, keeping this issue open until I find what is triggering those warnings from the Angular packages.

@HMubaireek Looks like it is being caused by angular-devkit package.

You can check this old chokidar issue and read the first comment to notice fsevents should not be installed on Linux neither Windows.

Also, to point out a possible fix, please read this Angular issue.

Cheers!