Did you ever encounter this error message and wondered why it happened? If you use @remix-run/node you should let eslint help you to avoid this error.
.eslintrc.js
1/** @type {import('@types/eslint').Linter.BaseConfig} */2module.exports ={3...// other config4rules:{5'no-restricted-imports':[6'error',7{8paths:[9{10name:'express',11importNames:['json'],12message:'Please use "@remix-run/node" instead'13}14]15}16]17}18}
Then you get the following error when you try to import the "wrong" json module.
1error 'json'importfrom'express' is restricted. Please use "@remix-run/node" instead no-restricted-imports