Loopback giving Maximum call stack size exceeded error
Asked Answered
S

1

6

I have set up my Loopback project and installed other packages required to run my project. Whenever I tried to run the application with the command within the folder

    node . 

it is raising following error:

test_app/node_modules/strong-remoting/lib/shared-method.js:157
  if (/^prototype\./.test(name)) {
                     ^

RangeError: Maximum call stack size exceeded

I am literally unknown about this error. Can you please suggest any solution?

Sy answered 24/10, 2017 at 12:57 Comment(2)
Can you share your code where it gives to you errorExogenous
@FerhatBAŞ, I haven't written a single line of code. Just created model and trying to set relation in the models using loopback. When I try to rerun the application with node . it is giving this error.Sy
H
15

I had the same issue and this worked for me:

  1. Go in your models folder which should be somewhere --> /projectfolder/common/models/

  2. Open the files of the models you just set your relation about --> yourmodel.json

  3. Delete this part in your "relations" -->

     "options": {
       "nestRemoting": true
     }
    
  4. If you have set 2 relations such as hasMany and belongesTo you should apply this to booth.

Henna answered 25/10, 2017 at 9:2 Comment(2)
You are the life saver!. Thanks buddy!.Sy
The question should be, what effect will deleting this option have on your API. This option was chosen for a reasonVc

© 2022 - 2024 — McMap. All rights reserved.