Open AnnaBova19 opened 4 years ago
Just been looking in to this myself today and have the same issues.
Did you manage to fix?
a reproduction demo, please?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Element UI version "element-ui": "^2.10.1"
OS/Browsers version Linux, Chrome
Vue version "vue": "2.*"
I have a project Laravel & Vue.js. We are using Element UI. We want SSR to make our application SEO friendly. I've followed the documentation of Vue SSR. But I have some problems with Element UI. after running npm run dev I got the next errors:
The command "/usr/bin/node /home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js" failed. Exit Code: 1(General error) Working directory: /home/vagrant/project/public Output: ================ Error Output: ================ /home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728 !function(e,t){ true?module.exports=t(__webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.js")):undefined}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){ ReferenceError: document is not defined at Module.<anonymous> (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:71812) at i (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:278) at Object.<anonymous> (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:22890) at i (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:278) at /home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:1083 at /home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:1093 at ./node_modules/element-ui/lib/index.js (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:37) at Object../node_modules/element-ui/lib/index.js (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:419728:115) at __webpack_require__ (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:22:30) at Module../node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./resources/js/components/atoms/button/index.vue?vue&type=script&lang=js& (/home/vagrant/project/storage/app/ssr/af5506b02d5fc2d0c85ea38dba994c7a.js:318829:72) (View: /home/vagrant/project/resources/views/landing.blade.php)
package.json
Please, help!!!
What is Expected? Element UI to be friendly with SSR
What is actually happening? The SSR failed because of the errors at ./node_modules/element-ui/lib/index.js