Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown file extension ".svelte" error #6

Open
digitaldrreamer opened this issue Jul 23, 2024 · 0 comments
Open

Unknown file extension ".svelte" error #6

digitaldrreamer opened this issue Jul 23, 2024 · 0 comments

Comments

@digitaldrreamer
Copy link

I keep getting this error:

error

All I did was use the example code on a test sveltekit route:

<script>
  import FormEditor from "@fouita/form-editor"
  // you can create a button to toggle the editable variable
  let editable = true
  // initial form schema needed
  let form =  {
    "name": "My Form",
    "version": "1",
    "steps": [{
        "index": 0,
        "props": {
            "previousBtn": "Back",
            "nextBtn": "Next"
        },
        "inputs": [    
        ]
    }]
  }
  const settings = {
	  textColor: "250 250 250",
	  bgColor: "0 0 0",
	  outlineColor: "165 180 252",
	  buttonBgColor: "79 70 229",
	  buttonTextColor: "255 255 255",
	  borderColor: "200 200 200",
	  form: form,
	  rounded: "rounded-none",
	  size: "full",
	  rtl: false,
	  transparent: false,
	  btnsPosition: "start", // start, end, center
  }
  // get updated data
  $: if(form) {
    // form is updated
  }
  function handleSubmit(evt) {
    // send data to your server
  }
</script>
<FormEditor bind:form {editable} {...settings} on:submit={handleSubmit} />

Help will be greatly appreciated.

Full error:

|- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".svelte" for C:\Users\user\Documents\Github\SvelteKit\Goremote Africa\main\node_modules\@fouita\form-editor\src\App.svelte
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
    at defaultLoad (node:internal/modules/esm/load:143:22)
    at async ModuleLoader.load (node:internal/modules/esm/loader:403:7)
    at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:45)
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".svelte" for C:\Users\user\Documents\Github\SvelteKit\Goremote Africa\main\node_modules\@fouita\form-editor\src\App.svelte
    at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
    at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
    at defaultLoad (node:internal/modules/esm/load:143:22)
    at async ModuleLoader.load (node:internal/modules/esm/loader:403:7)
    at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:45)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant