You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <script>const pkStringGenerator = () => (Math.random() + 1).toString(36).substring(7);
| import { createStoreEmpty, populateSvelvetStoreFromUserInput, } from '../../store/controllers/storeApi';
| import { afterUpdate, onMount } from 'svelte';
ERROR in ./node_modules/svelvet/index.js 5:0-30
Module not found: Error: Can't resolve './types/types' in '/var/www/html/node_modules/svelvet'
Did you mean 'types.js'?
BREAKING CHANGE: The request './types/types' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
webpack compiled with 2 errors```
What am I wrong here?
My environment:
- Laravel 8
- Vue 2.7.14
- svelvet 6.0.9
My steps:
- Install Svelvet from npm: ```npm install svelvet```
- Import it to .vue file ```import Svelvet from "svelvet";```
- Add to component: ```components: { Svelvet, } ```
- Add ```<Svelvet :nodes="nodes" :edges="edges" background />``` to .vue file
- with data ```nodes: [
{
id: 1,
position: { x: 200, y: 50 },
data: { label: 'Input Node' },
width: 175,
height: 40,
bgColor: 'white'
},
{
id: 2,
position: { x: 25, y: 150 },
data: { label: 'Option #1' },
width: 175,
height: 40,
bgColor: '#B8FFC6',
borderColor: 'transparent'
},
{
id: 3,
position: { x: 375, y: 150 },
data: { label: 'Option #2' },
width: 175,
height: 40,
bgColor: '#FFB8B8',
borderColor: 'transparent'
}
],
edges: [
{ id: 'e1-2', source: 1, target: 2, label: ' YES ', animate: true },
{ id: 'e2-3', source: 1, target: 3, label: ' NO ', animate: true }
],```
- Run ```npm run dev```
- Got above errors
- Please let me know
Thank you
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I got this error when build Laravel-Vuejs:
Beta Was this translation helpful? Give feedback.
All reactions