codesandbox / codesandbox/codesandbox-client
cannot set property JitCompilerFactory of [object Object] which has only a getter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
Hello team,
I am using sandpack client and compiling my angular application. I use the latest version of sandpack-client which is 2.6.3. My scenario is to run the test case after the client.updatesandbox. In my test case, I can only able to access the component if I use TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); But when I use this in sandpack client after the execution of the test case I am getting cannot set property JitCompilerFactory of [object Object] which has only a getter and multiple errors. But the same code working fine in my local angular app. One more thing is in sandpack test case working fine when I don't use client.updatesandbox method. only getting this error after client.updatesandbox triggers. In client.updatesandbox i am passing the same code again. Don't know why this happens. Kindly provide me a solution for this issue.
Versions used:
"dependencies": {
"@angular/animations": "^13.2.0",
"@angular/common": "^13.2.0",
"@angular/compiler": "^13.2.0",
"@angular/core": "^13.2.0",
"@angular/forms": "^13.2.0",
"@angular/platform-browser": "^13.2.0",
"@angular/platform-browser-dynamic": "^13.2.0",
"@angular/router": "^13.2.0",
"rxjs": "^7.4.0",
"tslib": "^2.3.1",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.2.1",
"@angular/cli": "^13.2.1",
"@angular/compiler-cli": "^13.2.0",
"@types/jasmine": "~3.10.0",
"@types/jest": "^27.4.0",
"@types/node": "^16.11.16",
"codelyzer": "^6.0.2",
"jasmine-core": "~3.10.0",
"jasmine-spec-reporter": "~7.0.0",
"jest": "^27.4.7",
"jest-preset-angular": "^11.0.2",
"karma": "~6.3.11",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.7.0",
"protractor": "^7.0.0",
"ts-node": "^10.4.0",
"tslint": "~6.1.0",
"typescript": "^4.5.4"
}
"@codesandbox/sandpack-client": "^2.6.3",
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or failing tests are named. Start by reproducing the Angular test case with @codesandbox/sandpack-client 2.6.3, comparing execution before and after client.updateSandbox and using TestBed.initTestEnvironment; done means the repeated sandbox code runs without the JitCompilerFactory getter error or related errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript, typescript
- Domain
- frontend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100