Ng Serve fails at 95% - TypeError: callbacks[i] is not a function
Versions
Angular CLI: 1.6.8
Node: 9.5.0
OS: darwin x64
Angular: 5.2.4
@angular/cli: 1.6.8
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript: 2.5.3
webpack: 3.10.0
MacOS High Sierra 10.13.3
Repro steps
MacBook-Pro:~ daniel$ ng new test-proj ... Installed packages for tooling via npm. Successfully initialized git. Project 'test-proj' successfully created.
MacBook-Pro:~ daniel$ cd test-proj/
MacBook-Pro:test-proj daniel$ npm install up to date in 6.008s
MacBook-Pro:test-proj daniel$ ng serve
Observed behavior
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
95% emitting/Users/daniel/test-proj/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40
callbacks[i](err, result);
^
TypeError: callbacks[i] is not a function
at Storage.finished (/Users/daniel/test-proj/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:40:15)
at /Users/daniel/test-proj/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:77:9
at /Users/daniel/test-proj/node_modules/graceful-fs/polyfills.js:287:18
at FSReqWrap.oncomplete (fs.js:167:5)
Desired behavior
For build to be 100% successful and served to browser
Solution using npm install [email protected] --save not working for me
After doing the npm install copy-webpack I get
Module build failed: Error: Cannot find module 'cuint'
Seems apt
npm install [email protected] works also here. many thanks
npm install [email protected] Will this work for our project as below version "@angular/cli": "1.6.1", "@angular/compiler-cli": "5.1.1", "typescript": "2.4.2"?
Same problem here
npm install [email protected] --save didn't work for my case! Any other solution, please?
npm install [email protected] -save worked. many thanks
You should not --save the module to your project.json, because it is only a temporary fix. Instead, use a lock file. Read the explanations from @filipesilva above.
npm install [email protected] -save didn't help in my case
if npm install [email protected] doesn`t help try add in package.json:
"optionalDependencies": { "copy-webpack-plugin": "4.3.1" }, "resolutions": { "copy-webpack-plugin": "4.3.1" }
Have fix https://github.com/webpack-contrib/copy-webpack-plugin/pull/221, just wait release in near minutes
Same issue here on Bash windows
What do I need to do exactly once webpack-contrib/copy-webpack-plugin#221 has passed Travis-CI?
Same
hi guys, i add in my package.json ... "copy-webpack-plugin": "4.3.0", ... and solved my problems!
I get the same problem when deploying to Heroku.
Hi, @maicongobbi Will this work for below version "@angular/cli": "1.6.1", "@angular/compiler-cli": "5.1.1", "typescript": "2.4.2"?
OK IT WORKED
THANKS
node v9.3.0 npm 5.6.0
"@angular/cli": "1.6.8",
"@angular/compiler": "^5.2.0",
"typescript": "^2.6.2",
"@types/node": "^9.4.2",
"copy-webpack-plugin": "^4.4.1",
the new copy-webpack-plugin rev fixes it
thank you mate