Angular Error NG Serves

Asked

Viewed 1,538 times

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)
  • João, do the following, delete your "node_modules" folder and then run the npm install command, this should solve.

  • I did this procedure and it didn’t work.

  • João, try to delete the node_modules folder and run the command "npm cache clean --force" and then do the "npm install" always running the terminal in Admin mode.

  • Thanks I’ll try now.

  • @Giovanni Dias appeared this new error

  • @Joãoroberteweozo this mistake started when?

Show 1 more comment

2 answers

0

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

npm install jquery --save

and then go to the archive angular json. set where the jquery installation folder is. There you should add us scripts the following line without the ../ at the front of the code line. See:

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

And I also installed Tether with the remote:

npm install tether

Inside the project directory.

-1

It really was the lack of Jquery :

npm install jquery --save

Browser other questions tagged

You are not signed in. Login or sign up in order to post.