Add type: module to package.json

Can't deploy to Netlify because package throws an error of not having `type: module` in package.json:

```
Dec 29, 11:07:56 AM: 6be0f3aa ERROR  (node:8) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
Dec 29, 11:07:56 AM: 6be0f3aa ERROR  Unhandled Promise Rejection 	{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"SyntaxError: Cannot use import statement outside a module","reason":{"errorType":"SyntaxError","errorMessage":"Cannot use import statement outside a module","stack":["/var/task/node_modules/svelte-carousel/src/main.js:1","import Carousel from './components/Carousel/Carousel.svelte'","^^^^^^","","SyntaxError: Cannot use import statement outside a module","    at Object.compileFunction (node:vm:352:18)","    at wrapSafe (node:internal/modules/cjs/loader:1033:15)","    at Module._compile (node:internal/modules/cjs/loader:1069:27)","    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)","    at Module.load (node:internal/modules/cjs/loader:981:32)","    at Function.Module._load (node:internal/modules/cjs/loader:822:12)","    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:163:29)","    at ModuleJob.run (node:internal/modules/esm/module_job:198:25)","    at async Promise.all (index 0)","    at async ESMLoader.import (node:internal/modules/esm/loader:385:24)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: SyntaxError: Cannot use import statement outside a module","    at process.<anonymous> (file:///var/runtime/index.mjs:1194:17)","    at process.emit (node:events:527:28)","    at emit (node:internal/process/promises:140:20)","    at processPromiseRejections (node:internal/process/promises:274:27)","    at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
Dec 29, 11:07:56 AM: Unknown application error occurred
Runtime.Unknown
Dec 29, 11:07:56 AM: 6be0f3aa Duration: 634.54 ms	Memory Usage: 58 MB
```
This commit is contained in:
Aunum
2022-12-29 11:16:38 -05:00
committed by GitHub
parent 311f69d2a7
commit b30885ea02

View File

@@ -4,6 +4,7 @@
"description": "Svelte carousel",
"main": "src/main.js",
"author": "vadimkorr",
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/vadimkorr/svelte-carousel.git"