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

前端 未结 11 1698
离开以前
离开以前 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:53

    Once again the angular team makes things harder for not real reason =(

    I had this problem and after Googling around fruitlessly I wondered if they had changed relative paths somehow as well as renaming angular-cli.json.

    A little further up in the file I found the line:

    Yeah, just change:

    "../node_modules/jquery/dist/jquery.js",
    "../node_modules/tether/dist/js/tether.js",
    "../node_modules/bootstrap/dist/js/bootstrap.js"
    

    to

    "./node_modules/jquery/dist/jquery.js",
    "./node_modules/tether/dist/js/tether.js",
    "./node_modules/bootstrap/dist/js/bootstrap.js"
    

提交回复
热议问题