"Maximum call stack size exceeded" due to faulty package-lock.json (jQuery-free NPM)
See original GitHub issueSimilar 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()
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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 apackage-lock.json
file in which DevExtreme is included twice (at the top level and innode_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:
node_modules
package-lock.json
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.
@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):
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