Search Docs
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.
/** @type {import('@types/eslint').Linter.BaseConfig} */ module.exports = { ... // other config rules: { 'no-restricted-imports': [ 'error', { paths: [ { name: 'express', importNames: ['json'], message: 'Please use "@remix-run/node" instead' } ] } ] } }
Then you get the following error when you try to import the "wrong" json module.
error 'json' import from 'express' is restricted. Please use "@remix-run/node" instead no-restricted-imports