Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
Issue Description
Steps to reproduce
$ npm create svelte@latest my-app
$ # -> svbeltekit demo app, using typescript
$ # -> no, no, no, no
$ cd my-app
$ npm i
$ npm i --save [email protected]
Now add this line e.g. to routes/Header.svelte:
import Parse from "parse/node";
And launch the site, check the JS console.
Actual Outcome
start.js:39 Uncaught (in promise) TypeError: Class extends value undefined is not a constructor or null
at node_modules/parse/lib/node/LiveQuerySubscription.js (LiveQuerySubscription.js:100:42)
at __require2 (chunk-7FP5O474.js?v=548792af:10:50)
at node_modules/parse/lib/node/LiveQueryClient.js (LiveQueryClient.js:10:53)
at __require2 (chunk-7FP5O474.js?v=548792af:10:50)
at node_modules/parse/lib/node/ParseLiveQuery.js (ParseLiveQuery.js:8:47)
at __require2 (chunk-7FP5O474.js?v=548792af:10:50)
at node_modules/parse/lib/node/Parse.js (Parse.js:255:19)
at __require2 (chunk-7FP5O474.js?v=548792af:10:50)
at node_modules/parse/node.js (node.js:1:18)
at __require2 (chunk-7FP5O474.js?v=548792af:10:50)
node_modules/parse/lib/node/LiveQuerySubscription.js @ LiveQuerySubscription.js:100
__require2 @ chunk-7FP5O474.js?v=548792af:10
node_modules/parse/lib/node/LiveQueryClient.js @ LiveQueryClient.js:10
__require2 @ chunk-7FP5O474.js?v=548792af:10
node_modules/parse/lib/node/ParseLiveQuery.js @ ParseLiveQuery.js:8
__require2 @ chunk-7FP5O474.js?v=548792af:10
node_modules/parse/lib/node/Parse.js @ Parse.js:255
__require2 @ chunk-7FP5O474.js?v=548792af:10
node_modules/parse/node.js @ node.js:1
__require2 @ chunk-7FP5O474.js?v=548792af:10
(anonymous) @ node.js:1
await in (anonymous) (async)
(anonymous) @ (index):201
Expected Outcome
Parse gets imported correctly.
Environment
Package.json:
{
"name": "my-app",
"version": "0.0.1",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@fontsource/fira-mono": "^4.5.10",
"@neoconfetti/svelte": "^1.0.0",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.5.0",
"@types/cookie": "^0.5.1",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"tslib": "^2.4.1",
"typescript": "^4.9.3",
"vite": "^4.0.0"
},
"type": "module",
"dependencies": {
"parse": "^4.0.0-alpha.12"
}
}
Server
- Parse Server version:
no server involved, SDK version see above
- Operating system:
linux
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local
Database
- System (MongoDB or Postgres):
none
- Database version:
none
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
none
Client
- Parse JS SDK version:
4.0.0-alpha.12