question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Maximum call stack size exceeded" due to faulty package-lock.json (jQuery-free NPM)

See original GitHub issue

Similar issues that were supposed to have been fixed in the 1.4 version from https://github.com/DevExpress/DevExtreme.AspNet.Data/issues/186 are still occuring. The console output is:

core.js:1448 ERROR RangeError: Maximum call stack size exceeded
    at new exports.Deferred (deferred.js:158)
    at inheritor._loadImpl (custom_store.js:221)
    at inheritor.eval [as _loadImpl] (class.js:16)
    at inheritor.load [as _loadFunc] (abstract_store.js:55)
    at invokeUserLoad (custom_store.js:71)
    at inheritor._loadImpl (custom_store.js:225)
    at inheritor.eval [as _loadImpl] (class.js:16)
    at inheritor.load [as _loadFunc] (abstract_store.js:55)
    at invokeUserLoad (custom_store.js:71)
    at inheritor._loadImpl (custom_store.js:225)

Packages:

    "devextreme": "17.2.6",
    "devextreme-angular": "^17.2.6",
    "devextreme-aspnet-data-nojquery": "1.4.0",

Simple setup to reproduce are included in issue 186 above. Seems to be an infinite recursion happening between:

        var that = this;
        options = options || {};
        this.fireEvent("loading", [options]);
        return this._withLock(this._loadImpl(options)).done(function(result) {
            that.fireEvent("loaded", [result, options])
        })
    }

and

_loadImpl: function(options) {
        var d = new Deferred;
        if ("raw" === this._loadMode) {
            runRawLoadWithQuery(d, this, options, false)
        } else {
            invokeUserLoad(this, options).done(function(data, extra) {
                d.resolve(data, extra)
            }).fail(createUserFuncFailureHandler(d));
            d = this._addFailHandlers(d)
        }
        return d.promise()
    }

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AlekseyMartynovcommented, Mar 26, 2018

@jtsom

We have recently received a report about the same issue and finally we’ve been able to reproduce it.

It appears that a certain sequence of npm install commands can produce a package-lock.json file in which DevExtreme is included twice (at the top level and in node_modules\devextreme-aspnet-data-nojquery\node_modules\devextreme). This duplication breaks runtime logic and causes infinite recursion.

The plan-portal.zip archive attached in https://github.com/DevExpress/DevExtreme.AspNet.Data/issues/214#issuecomment-371175888 doesn’t include package-lock.json. That’s why I was unable to see this behavior on my side.

The following steps should fix your lock-file:

  • Delete node_modules
  • Delete package-lock.json
  • Run npm install

This could be an NPM bug (https://github.com/npm/npm/issues/18351). However, we have some ideas on how to mitigate it on our side.

I’m reopening the ticket and will update it when we have more info.

0reactions
AlekseyMartynovcommented, May 24, 2018

@davidsk In your AMD samples, DevExtreme is loaded twice. I can see entries for DevExtreme bundle (dx.all.js) and for DevExtreme modules (abstract_store.js):

untitled-1

Multiple instances of DevExtreme code don’t recognize each other and, as a special case, Class inheritance, breaks.

With AMD, don’t load DevExtreme bundle, instead require individual widgets, as shown here. Without AMD, devextreme-aspnet-data-nojquery doesn’t work due to the lack of exported internals.

cc @kvet @ovchinnikov

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maximum call stack size exceeded on npm install
In my case I kept juggling between this error (maximum call stack size exceeded) and the access error event when I did a...
Read more >
How to fix npm maximum call stack size exceeded error
First, make sure that you are using the latest NodeJS and npm versions for your project. Now the npm install command sometimes builds...
Read more >
Maximum call stack size exceeded on npm install [Solved]
The "Maximum call stack size exceeded" NPM error occurs when you try to `npm install` a package but the installation process fails.
Read more >
[javascript] Maximum call stack size exceeded on npm install
The answer is · First of all you need to make sure that your node and npm versions are up to date. ·...
Read more >
Maximum call stack size exceeded error in V22
I've tried deleting node_modules & package-lock & re-installing but just can't get it to work. JavaScript. import React from 'react' import { ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found