首页 > 解决方案 > 92% 在项目上运行 ng serve 时挂断

问题描述

我正在尝试运行 ng serve 但我的项目一直挂在 92% 并且没有运行。

    92% additional asset processing scripts-webpack-plugin× 「wdm」: Error: ENOENT: no such file or directory, open 'C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\assets\js\demo\chart-area-demo.js'
    at Object.openSync (fs.js:443:3)
    at Object.readFileSync (fs.js:343:35)
    at Storage.provideSync (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13)
    at CachedInputFileSystem.readFileSync (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32)
    at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@ngtools\webpack\src\webpack-input-host.js:35:51)
    at Observable._trySubscribe (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\rxjs\internal\Observable.js:30:22)
    at SyncDelegateHost._doSyncCall (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:22:20)
    at SyncDelegateHost.read (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:49:21)
    at WebpackCompilerHost.readFileBuffer (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@ngtools\webpack\src\compiler_host.js:129:44)
    at VirtualFileSystemDecorator.readFile (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@ngtools\webpack\src\virtual_file_system_decorator.js:42:54)
    at Promise (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\scripts-webpack-plugin.js:69:49)
    at new Promise (<anonymous>)
    at scripts.map.fullPath (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\scripts-webpack-plugin.js:68:24)
    at Array.map (<anonymous>)
    at hook (C:\Users\Blayne Bennett\Desktop\the-nibblonians\client\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\scripts-webpack-plugin.js:67:43)

标签: node.jsangularnpmwebpack

解决方案


ng serve如果您使用的是 windows 系统,请尝试在 windows power shell 中运行。

使用 powershell 后,编译时间比以前有所改善。试试看。


推荐阅读