Jquery not working in angular 6 Error: ENOENT: no such file or directory, open '…\node_modules\jquery\dist\jquery.min.js'

前端 未结 11 1699
离开以前
离开以前 2021-02-01 02:02

I am in process migrating Angular 5 project to Angular 6.

While starting application by

npm start

getting the below error



        
11条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 02:37

    Relative path ../ used to go back one directory. So, first check the file path, if its not contain your project root folder you are searching that jquery file somewhere else that even not exist.

    If node_modules file and angular.json both in same directory you donot need to use relative path.

    In Angular 6, you donot need to use relative path to go inside node_modules from angular.json(../ or even like ./).

提交回复
热议问题