常见错误.md 1.5 KB

  • 常见错误

    . 一

    94% asset optimization ERROR  Failed to compile with 7 errors16:55:29
    
    error  in ./src/assets/styles/index.scss
    
    Module build failed: Error: Missing binding C:\work\oak\vue-client\node_modules\node-sass\vendor\win32-x64-48\binding.node
    Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x
    

解决办法

  • 把doc/node-sass-lib里面的文件放到 node_modules/node-sass/vendor中,如果没有vendor文件,那么需手动创建一个

. 二

[Vue warn]: Error in event handler for "click": "TypeError: Cannot read property 'Add' of undefined"

found in

---> <ElButton>
       <CompForm> at src/view/admin/new-vuex/form.test.vue
         <ElDialog>
           <ElCard>
             <NewVuex> at src/view/admin/new-vuex/index.vue
               <ElMain>
                 <ElContainer>... (1 recursive calls)
                   <Container> at src/packages/ui/container.vue
                     <Router> at src/packages/ui/router.vue
                       <App> at src/App.vue
                         <Root>

解决办法

  重要信息 'Add' of undefined
  请检查你的导包方式是否与应对导出方式相匹配
  例:一
      export Demo { xxx ... }
      使用 import {Demo} from '../xxx'
      导出的名字要和导入的名字一样
     二
     export default Demo { xxx ... }
     使用 import Demo from '../xxx';  Demo 这个名字可以自由取名,建议与导出之相对应