Angular4.x Module not found: Error: Can't resolve 'classlist.js'

后端 未结 4 573
失恋的感觉
失恋的感觉 2021-02-12 14:41

When I remove comment part in polyfills.ts for polyfills to load page in Internet Explore

相关标签:
4条回答
  • 2021-02-12 14:55

    remove the current package,

    npm uninstall classlist.js --save
    

    then run

    npm cache verify
    

    afterwards run

    npm install classlist.js --save-exact
    
    0 讨论(0)
  • 2021-02-12 14:56
    /** IE9, IE10 and IE11 requires all of the following polyfills. **/
             import 'core-js/es6/symbol';
             import 'core-js/es6/object';
             import 'core-js/es6/function';
             import 'core-js/es6/parse-int';
             import 'core-js/es6/parse-float';
             import 'core-js/es6/number';
             import 'core-js/es6/math';
             import 'core-js/es6/string';
             import 'core-js/es6/date';
             import 'core-js/es6/array';
             import 'core-js/es6/regexp';
             import 'core-js/es6/map';
             import 'core-js/es6/weak-map';
             import 'core-js/es6/set';
    
    0 讨论(0)
  • 2021-02-12 15:02

    You're importing a polyfill that is not included by default. You have to install it as a dependency first. How to do that is in a comment on the same line that imports it:

    // Run `npm install --save classlist.js`.
    

    The same goes for the web-animations-js polyfill if you haven't done so already.

    0 讨论(0)
  • 2021-02-12 15:04

    Run the following commands in terminal/command prompt:

    1. npm install --save classlist.js
    2. npm install --save web-animations-js
    0 讨论(0)
提交回复
热议问题