Argument of type 'Context' is not assignable to parameter of type 'LoaderContext

Hi, I am getting above error in various files when deploying on production after upgrading my ts-config from 4.00 to 5.00. I do not get it when building the docker image on my local machine. Any ideas how that discrepancy would happen?
Solution:
Use LoaderContext where you currently use Context. Wherever the error shows up. For further support show the errors and the code. Also:
Jump to solution
10 Replies
Solution
Favna
Favna12mo ago
Use LoaderContext where you currently use Context. Wherever the error shows up. For further support show the errors and the code. Also:
Spinel
Spinel12mo ago
When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stack traces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
❯ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. ❯ For an excellent video that shows how not to ask technical questions, watch this YouTube video by LiveOverflow. ❯ Asking technical questions (Clarkson)How to ask questions the smart way (Raymond)
Ravelt
RaveltOP12mo ago
I've since realized it's because my package-lock.json was in my gitignore so there was a package discrepancy causing different build results. I'll have to do this when I update my other dependencies I'm guessing. Thanks!
Favna
Favna12mo ago
it was also related to framework updates (pieces specifically but that's transitive), not ts-config. That said you should aim to always keep your dependencies uptodate in general.
Ravelt
RaveltOP12mo ago
yeah i've def fallen way behind on that front 😅 trying to slowly get through the breaking changes one at a time now
Favna
Favna12mo ago
if your code is on github you can employ a service such as Renovate or Dependabot to aid in the endeavour at sapphire we use Renovate
Ravelt
RaveltOP12mo ago
So I just added dependabot to my repo, opened a bunch of pr which I merged for trvial updates. Have one opened for sapphire framework now. Normally here would you checkout the branch for the PR and try to fix everything that breaks?
Favna
Favna12mo ago
correct
Ravelt
RaveltOP12mo ago
is there a way to get dependabot to open PR for the plugins too so all the changelogs are in one place
Favna
Favna12mo ago
grouped updates? no. Renovate does have that though and if you use the sapphire config like sapphire repos do then that's all set up automatically though renovate will create separate prs for major version bumps and we also post changelogs to #Announcements
Want results from more Discord servers?
Add your server