Angular Error NG Serve

0

Does anyone know why this error is occurring?

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
 91% additional asset processing scripts-webpack-plugin× 「wdm」: Error: ENOENT: no such file or directory, open 'C:\cms\node_modules\jquery\dist\jquery.js'
    at Object.openSync (fs.js:434:3)
    at Object.readFileSync (fs.js:339:35)
    at Storage.provideSync (C:\cms\Royal\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13)
    at CachedInputFileSystem.readFileSync (C:\cms\Royal\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32)
    at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\cms\Royal\node_modules\@ngtools\webpack\src\webpack-input-host.js:35:51)
    at Observable._trySubscribe (C:\cms\Royal\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\cms\Royal\node_modules\rxjs\internal\Observable.js:30:22)
    at SyncDelegateHost._doSyncCall (C:\cms\Royal\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:22:20)
    at SyncDelegateHost.read (C:\cms\Royal\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:49:21)
    at WebpackCompilerHost.readFileBuffer (C:\cms\Royal\node_modules\@ngtools\webpack\src\compiler_host.js:115:44)
    at VirtualFileSystemDecorator.readFile (C:\cms\Royal\node_modules\@ngtools\webpack\src\virtual_file_system_decorator.js:38:54)
    at Promise (C:\cms\Royal\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\scripts-webpack-plugin.js:92:49)
    at new Promise (<anonymous>)
    at scripts.map.fullPath (C:\cms\Royal\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\scripts-webpack-plugin.js:91:24)
    at Array.map (<anonymous>)
    at hook (C:\cms\Royal\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\scripts-webpack-plugin.js:90:43)
    
asked by anonymous 22.10.2018 / 16:19

1 answer

0

I was having this same problem only when I installed jquery in the project. Therefore, to solve the problem you should install jquery if you have uninstalled it.

npm install jquery --save

and then go to the angular.json file where the jquery installation folder is located. There you should add in the scripts the following line without the ../ in front of the line of code. See:

"scripts": [
              "node_modules/jquery/dist/jquery.min.js"
            ]

And I also installed Tether with the command:

npm install tether

Inside the project directory.

    
29.11.2018 / 23:22