-
-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL error: TypeError: Cannot set property 'history' of undefined #2366
Comments
Hey @daanmlab! 👋 Could you be a bit more descriptive, there's no way for us to help you with the amount of information you shared. |
Added some details. Sorry for being vague first time reporting an issue |
Can you share some code? Most likely you have something like this: const user = await User.find(10)
user.history = 'foobar' // throws "Cannot set property 'history' of undefined" if user with ID 10 does not exist |
just the be clear the code itself runs without any errors I only get an error when I try |
Could it be because of the big sur update @RomainLanz ? |
No, it's because the Please, downgrade your Node version for now if you want to use Adonis 4. |
okay thanks for letting me know |
`TypeError: Cannot set property 'history' of undefined
1 Repl._readHistoryFile
.../.nvm/versions/node/v15.5.0/lib/node_modules/@adonisjs/cli/src/Commands/Repl/index.js:62
2 Repl.handle
.../.nvm/versions/node/v15.5.0/lib/node_modules/@adonisjs/cli/src/Commands/Repl/index.js:109
3 anonymous
.../back-end/node_modules/@adonisjs/ace/src/Command/index.js:565
4 Function.exec
.../back-end/node_modules/@adonisjs/ace/src/Command/index.js:563
5 Function.commanderAction
.../back-end/node_modules/@adonisjs/ace/src/Command/index.js:540
6 Command.listener
.../back-end/node_modules/commander/index.js:315
7 Command.parseArgs
.../back-end/node_modules/commander/index.js:651
8 Command.parse
.../back-end/node_modules/commander/index.js:474
9 Kernel.invoke
.../back-end/node_modules/@adonisjs/ace/src/Kernel/index.js:329
10 Ignitor._invokeAce
.../back-end/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:532
11 Ignitor.fireAce
.../back-end/node_modules/@adonisjs/ignitor/src/Ignitor/index.js:847`
I'm working on an API I used the CLI to create it.
First time trying to start REPL.
System details:
OS: macos big sur 11.2.3
Shell: zsh
The text was updated successfully, but these errors were encountered: