When I am running npm run test in my Angular project, I get this RangeError: - karma-webpack

Chrome Headless 89.0.4389.114 (Windows 10) ERROR
Uncaught RangeError: Maximum call stack size exceeded
at localhost/karma_webpack/node_modules/zone.js/dist/mocha-patch.js
I tried a lot of things, even adding include:false in files section from karma.conf.js but didn't work. Do you have any idea what can cause this issue?

Related

ESlint Maximum call stack size exceeded Vue

When i try run: npm run dev
console throw this:
[eslint] Maximum call stack size exceeded
Occurred while linting C:\project\src\plugins\three\threejs.js:4
Rule: "vue/max-len"
I have try already deleting node_modules, and add /* eslint-disable */ on top of threejs.js file. But this didn`t help
SOLVED
Change eslintrc file config.
Triggering error vue/max-len.
Fixed by changing ignoreStrings: false on true
See more in the plugin documentation.

Array buffer allocation failed

I´m constantly getting this error message during webpack build
And the console print shows no way to trace the origin in vscode
I´m using webpack with vue.js
Error image:
Any idea to solve this issue?

BigCommerce Stencil Start Uncaught Error: Module parse failed

I'm getting the following error after running stencil start and accessing the localhost url in my browser:
Uncaught Error: Module parse failed: Unexpected token (10:9)
You may need an appropriate loader to handle this file type.
|
| var getAccount = function getAccount() {
> return import('./theme/account');
| };
|
at Object../assets/js/app.js (bootstrap:83)
at __webpack_require__ (bootstrap:19)
at bootstrap:83
at bootstrap:83
(index):1064 Uncaught TypeError: window.stencilBootstrap is not a function
at (index):1064
This just started happening this morning, I was able to run stencil yesterday without any problems.
I've followed the steps here exactly:
https://developer.bigcommerce.com/stencil-docs/getting-started/installing-stencil
I've tried uninstalling stencil and reinstalling multiple times. I've also tried using a fresh clone of cornerstone multiple times in multiple different directories. I can't get rid of this error and have tried all of the troubleshooting suggestions from the docs. There are no errors in the terminal.
I'm on macOS High Sierra 10.13.6
Node Version: v.6.4.0
Any ideas on why I'm getting this error?
This is an issue on our end with the Cornerstone 3.1 release, which can be downloaded through GitHub but hasn't rolled out to production yet. We've got an engineering ticket in to address it, but in the meantime, you can roll back to the Cornerstone 3.0 release to bypass the error. Sorry for the trouble!

Karma Uncaught RangeError: Maximum call stack size exceeded

I'm getting this error from Karma when trying to run grunt karma:debug:
11 11 2017 00:00:00.000:INFO [Chrome 62.0.3202 (Linux 0.0.0)]: Connected on socket /#AAAA-AAAAAAAAAAAAAAA with id 99999999
Chrome 61.0.0000 (Linux 0.0.0) ERROR
Uncaught RangeError: Maximum call stack size exceeded
at http://localhost:9876/context.html
Chrome 61.0.0000 (Linux 0.0.0) ERROR
Uncaught RangeError: Maximum call stack size exceeded
at http://localhost:9876/context.html
Chrome 61.0.0000 (Linux 0.0.0): Executed 0 of 0 ERROR (1.035 secs / 0 secs)
What can be the cause? it started to happen overnight after a commit with some big JSON files. If I go back to the commit without the JSON files, the command starts working again.
I found the problem in my karma.conf.js file:
config.set({
...
files: [
...
{ pattern: "path/to/fixtures/**/*.json" },
...
]
That line makes Karma include the JSON files inside the HTML page, and seems it had trouble with the amount of JSON files I was adding. The solution is to tell Karma to not include those files inside the HTML but to serve them as a WebServer:
config.set({
...
files: [
...
{ pattern: "path/to/fixtures/**/*.json", included: false },
...
]
Relevant documentation is here:
included
Type. Boolean
Default. true
Description. Should the files be included in the browser using
<script> tag? Use false if you want to load them manually,
eg. using Require.js.
Make sure that you have assigned component variable only once, ideally in top beforeEach only.
component = fixture.componentInstance - This should not be given in each describe.

Read Native accessing large file

I have a 8MB JSON file I need to access once when my application is opened.
Having the file in native assets and reading it over bridge is too slow. Using react-native-fetch-blob, the file is read by android in less than half second, then invoking resolve on the Promise (from Java) takes about 15 seconds.
Having it as a JSON file in the JS space, I cannot build the project, getting the error:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap
out of memory
The same issue is reported here, but no progress.
Anyone has faced this problem before?