nuxt structure (or whatever wrong)

hi, i'm trying to have some components working in my nuxt (v2.15.8) project: i really don't know what to do.


i downloaded samples from github and they work, when i put together as component  in my project all blows up:

my project structure:

sito2k21(root)
    - components
      Editor
      - index.vue

   - node_modules
      ..... 
   - pages
     - index.vue
........

here my SF component simple code:

<template>
<div id="defaultRTE">
<ejs-richtexteditor ref="defaultRTE" :height="400"
>{{ html }}
</ejs-richtexteditor>
</div>
</template>

<script lang="ts">
import Vue from 'vue'

import { RichTextEditorPlugin } from '@syncfusion/ej2-vue-richtexteditor'
Vue.use(RichTextEditorPlugin)

export default {
data() {
return {}
},
props: {
html: { type: String },
},
}
</script>
<style>
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-lists/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-vue-richtexteditor/styles/material.css';
</style>


and here what i get (and really i can't understand... ej2-pdf-export related???)
i get the same for any other syncfusion components, so must be an env issue

ERROR in ./components/Editor/index.vue?vue&type=style&index=0&lang=css& (./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./node_modules/vue-loader/lib??vue-loader-options!./components/Editor/index.vue?vue&type=style&index=0&lang=css&)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Can't resolve '../node_modules/@syncfusion/ej2-base/styles/material.css' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/components/Editor'
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/Resolver.js:209:21
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
at /Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js:27:15
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/unicode-true-type-font.js
Module not found: Error: Can't resolve './../../graphics/images/index' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js
Module not found: Error: Can't resolve './../../graphics/images/pdf-bitmap' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid/pdf-grid-cell.js
Module not found: Error: Can't resolve './../../graphics/images/pdf-image' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src/implementation/structured-elements/grid'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js
Module not found: Error: Can't resolve './../graphics/images/pdf-bitmap' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/pdf-resources.js
Module not found: Error: Can't resolve './../graphics/images/pdf-image' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/index.js
Module not found: Error: Can't resolve './implementation/graphics/images/byte-array' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/index.js
Module not found: Error: Can't resolve './implementation/graphics/images/image-decoder' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/index.js
Module not found: Error: Can't resolve './implementation/graphics/images/pdf-bitmap' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src'
ERROR in ./node_modules/@syncfusion/ej2-pdf-export/src/index.js
Module not found: Error: Can't resolve './implementation/graphics/images/pdf-image' in '/Volumes/WORK/DEVELOPEMENT/consorzio.iris/sito2k21/node_modules/@syncfusion/ej2-pdf-export/src'

4 Replies

VJ Vinitha Jeyakumar Syncfusion Team August 13, 2021 03:42 PM UTC

Hi Alberto, 
 
 
Greetings from Syncfusion support 
 
 
We have validated your query “I am trying to have some components working in my nuxt (v2.15.8) project: i really don't know what to do.” 
 
Based on your query you want to prepare EJ2 Rich Text Editor sample with NUXT JS. So, we have prepared a sample and in that sample we have used the NUXT JS & rendered our EJ2 Rich Text Editor component without any issues.   
  
For your convenience we have attached the sample so please refer the sample for your reference. 
 
Code snippet: 
Index.Vue 
<template> 
        <ejs-richtexteditor ref="defaultRTE" :height="400"> 
             
        </ejs-richtexteditor> 
    </template> 
 
    <script> 
    import Vue from "vue"; 
    import { RichTextEditorPlugin, Toolbar, Link, Image, Count, HtmlEditor, QuickToolbar } from "@syncfusion/ej2-vue-richtexteditor"; 
 
    Vue.use(RichTextEditorPlugin); 
 
    export default { 
        provide: { 
            richtexteditor:[Toolbar, Link, Image, Count, HtmlEditor, QuickToolbar] 
        } 
    } 
    </script> 
 
    <style> 
    </style> 
 
 
Please check the code snippet and sample and let us know if it satisfies your requirement. 
 
Regards, 
Vinitha. 



AT ALberto Tesoro August 13, 2021 07:19 PM UTC

donwloaded and tried: i think i'll give up, sorry but 2 whole days spent to (not) have a textbox it's frustrating

thanks for your time


   │ │

   │ Nuxt @ v2.15.8 │

   │ │

   │ ▸ Environment: development │

   │ ▸ Rendering: server-side │

   │ ▸ Target: server │

   │ │

   │ Listening: http://localhost:3000/

   │ │

   ╰───────────────────────────────────────╯


ℹ Preparing project for development 21:09:53

ℹ Initial build may take a while 21:09:53

ℹ Discovered Components: .nuxt/components/readme.md 21:09:53

✔ Builder initialized 21:09:53

✔ Nuxt files generated 21:09:53


✔ Client

  Compiled successfully in 15.26s


✔ Server

  Compiled successfully in 8.94s



 WARN Compiled with 2 warnings friendly-errors 21:10:10



 WARN in ./node_modules/@syncfusion/ej2-vue-richtexteditor/src/rich-text-editor/richtexteditor.component.js


"export 'Options' was not found in 'vue-class-component' friendly-errors 21:10:10

                                                            friendly-errors 21:10:10


 WARN in ./node_modules/@syncfusion/ej2-vue-richtexteditor/node_modules/@syncfusion/ej2-vue-base/src/component-base.js


"export 'Vue' (imported as 'Vue3') was not found in 'vue-class-component'

                                                            friendly-errors 21:10:10

ℹ Waiting for file changes 21:10:10

ℹ Memory usage: 565 MB (RSS: 754 MB) 21:10:10

ℹ Listening on: http://localhost:3000/ 21:10:10


_________________________

in devTools:

client.js?06a0:102 TypeError: Object(...) is not a function

    at eval (richtexteditor.component.js?5746:211)

    at eval (richtexteditor.component.js?5746:218)

    at Module../node_modules/@syncfusion/ej2-vue-richtexteditor/src/rich-text-editor/richtexteditor.component.js (index.js:7271)

    at __webpack_require__ (runtime.js:854)

    at fn (runtime.js:151)

    at eval (index.js?a4ef:1)

    at Module../node_modules/@syncfusion/ej2-vue-richtexteditor/src/index.js (index.js:7259)

    at __webpack_require__ (runtime.js:854)

    at fn (runtime.js:151)

    at eval (index.js?a780:1)

_callee$ @ client.js?06a0:102

tryCatch @ runtime.js?96cf:63

invoke @ runtime.js?96cf:294

eval @ runtime.js?96cf:119

asyncGeneratorStep @ asyncToGenerator.js?1da1:3

_next @ asyncToGenerator.js?1da1:25

eval @ asyncToGenerator.js?1da1:32

eval @ asyncToGenerator.js?1da1:21

eval @ client.js?06a0:64

Promise.catch (async)

eval @ client.js?06a0:114

eval @ client.js:1300

./.nuxt/client.js @ app.js:35

__webpack_require__ @ runtime.js:854

fn @ runtime.js:151

0 @ app.js:590

__webpack_require__ @ runtime.js:854

checkDeferredModules @ runtime.js:46

webpackJsonpCallback @ runtime.js:33

(anonymous) @ app.js:1

client.js?1b93:195 [HMR] bundle 'client' has 2 warnings



VJ Vinitha Jeyakumar Syncfusion Team August 16, 2021 12:39 PM UTC

Hi Alberto, 
 
 
Currently, we are validating your query. We will update you the further details on 17th August. 
 
Regards, 
Vinitha.  



VJ Vinitha Jeyakumar Syncfusion Team August 17, 2021 02:04 PM UTC

Hi Alberto 
 
 
We have further validated your query “nuxt structure (or whatever wrong) 
 
We have tried to reproduce the issue in the following ways, 
 
  • Ensured by creating a new nuxt project.
  • Ensured by rendering our Rich Text Editor component in it.
  • Also, Ensured by running the localhost in all major browsers.
 
But, we couldn’t reproduce the issue at our end. We have also prepared a sample for your reference, 
 
 
Can you please share the following details? 
 
  • The Vue version you have used in your nuxt project
  • If possible please share us with the issue reproducing runnable sample or modify the shared sample project with the issue reproducing code.
 
The above details will be helpful for us to reproduce the issue at our end and help you at earliest. 
 
Regards, 
Vinitha. 
 


Loader.
Up arrow icon