rsnext/errors
Todor Totev bad376127e
Detailed error and warnings upon next() call (#13539)
**First, apologies for a second PR on the same issue but I was working on this already so I thought I'd push it and let you decide which you want to merge.**

The PR is related to [13466](https://github.com/vercel/next.js/issues/13466).

Based on my research, the error happens if the options are empty, null, or undefined. That's why I have decided that the most proper check would be using the! post-fix expression operator may assert that its operand is non-null and non-undefined. ``if (options == null)``

(Optional)
I have also added a warning, which warns the user if the passed "dev" variable is not a boolean.

It's my first PR on the "packages" part of the repo so I'd be glad to receive all kinds of critics. If you want me to change or remove anything, I'm open to suggestions.

---

Fixes #13466
2020-06-03 03:19:29 +00:00
..
404-get-initial-props.md Rename getServerProps to getServerSideProps (#10722) 2020-02-27 11:04:30 -06:00
amp-bind-jsx-alt.md Add error message for AMP bind syntax (#6865) 2019-04-02 17:32:07 -05:00
amp-export-validation.md Add AMP validation on export (#6794) 2019-03-26 16:21:27 -05:00
api-routes-static-export.md Rename ZEIT to Vercel (#12075) 2020-04-21 11:47:12 +02:00
app-container-deprecated.md Prettier fix (#8754) 2019-09-16 15:24:42 +02:00
build-dir-not-writeable.md Rename ZEIT to Vercel (#12075) 2020-04-21 11:47:12 +02:00
built-in-css-disabled.md Add warning when built-in CSS/SCSS support is disabled (#10942) 2020-03-10 14:29:40 -04:00
can-not-output-to-public.md Fix can-not-output-to-public error title (#8988) 2019-10-08 08:28:09 -05:00
cant-override-next-props.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
circular-structure.md Remove trailing spaces (#6547) 2019-03-07 17:40:08 +01:00
config-resolve-alias.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
conflicting-amp-tag.md Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
conflicting-public-file-page.md Add src directory support (#8735) 2019-09-24 17:15:14 +02:00
css-global.md Add Links to Global CSS Error (#10031) 2020-01-10 09:31:38 -06:00
css-modules-npm.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
css-npm.md docs(errors): CSS Imported by a Dependency (#10032) 2020-01-10 10:40:28 -05:00
custom-error-no-custom-404.md Warn when user has pages/_error but no pages/404 (#11603) 2020-04-05 13:19:14 +02:00
doc-crossorigin-deprecated.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
empty-configuration.md fix: 9919 Add warning when no config is exported from next.con… (#10228) 2020-01-29 09:12:30 +01:00
empty-object-getInitialProps.md fix broken link in error page (#10159) 2020-01-19 16:02:44 +01:00
env-key-not-allowed.md Block Certain Env Keys That Are Used Internally (#6260) 2019-02-15 17:49:40 +01:00
env-loading-disabled.md Enable .env support by default (#12911) 2020-05-15 14:02:16 -05:00
export-path-mismatch.md Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
generatebuildid-not-a-string.md Trim buildId returned from generateBuildId (#5634) 2018-11-12 15:57:48 +01:00
get-initial-props-as-an-instance-method.md Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
gssp-component-member.md Add error when GSSP methods are added as page component members (#11645) 2020-04-03 19:08:17 -04:00
gssp-export.md Add error when attempting to export GSSP page (#11154) 2020-03-18 09:33:10 +01:00
head-build-id.md Make Client request BUILD_ID from the Server (#6891) 2019-04-04 17:54:01 -04:00
incompatible-href-as.md Prettier fix (#8754) 2019-09-16 15:24:42 +02:00
install-sass.md Improve Sass Error (#10982) 2020-03-11 16:34:14 -04:00
invalid-assetprefix.md Add check for invalid assetPrefix (#9759) 2019-12-16 16:07:03 +01:00
invalid-getstaticpaths-value.md Remove unstable_ prefix from new methods (#10723) 2020-02-27 11:57:39 -06:00
invalid-getstaticprops-value.md Add params to getStaticProps on err.sh (#10751) 2020-03-01 15:20:28 +01:00
invalid-href-passed.md Prettier fix (#8754) 2019-09-16 15:24:42 +02:00
invalid-multi-match.md Add err.sh for invalid multi-match usage (#9498) 2019-11-23 02:23:01 +01:00
invalid-page-config.md Normalize errors to use nextjs.org (#8518) 2019-08-26 16:00:37 +02:00
invalid-react-version.md Add checking of react versions (#6892) 2019-04-04 16:47:17 -05:00
invalid-resolve-alias.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
invalid-route-source.md Add parsing of route source during checking (#9787) 2019-12-19 10:48:34 -06:00
invalid-server-options.md Detailed error and warnings upon next() call (#13539) 2020-06-03 03:19:29 +00:00
minification-disabled.md Prettier fix (#8754) 2019-09-16 15:24:42 +02:00
missing-env-value.md Add initial process.env stubbing for new env support (#11893) 2020-04-15 02:42:37 -04:00
multi-tabs.md Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
nested-reserved-page.md Add warning when reserved pages are nested (#13449) 2020-05-27 16:45:53 +00:00
next-dynamic-modules.md Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
next-export-serverless.md Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
next-head-count-missing.md Add warning for missing <Head> (#8276) 2019-08-11 22:48:05 -04:00
next-start-serverless.md Throw Error When Running next start on Serverless Build (#6166) 2019-01-29 13:42:07 +01:00
no-cache.md Remove beta label from Netlify Plugins (#13465) 2020-05-27 20:30:39 +00:00
no-document-title.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
no-on-app-updated-hook.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
no-router-instance.md Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
non-standard-node-env.md Better NODE_ENV explanation (#13476) 2020-05-28 09:10:22 +00:00
opt-out-auto-static-optimization.md Add note about HoC possibly adding GIP to _app (#12491) 2020-05-05 00:11:25 -04:00
opt-out-automatic-prerendering.md s/Automatic Prerendering/Automatic Static Optimization/ (#8940) 2019-10-02 18:03:00 -04:00
page-without-valid-component.md Remove static optimization from message (#9045) 2019-10-11 10:39:38 -04:00
popstate-state-empty.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
postcss-function.md PostCSS Error When Exporting Function (#10242) 2020-01-23 15:39:50 -05:00
postcss-ignored-plugin.md Explain Ignored PostCSS Plugin (#10240) 2020-01-23 15:28:37 -05:00
postcss-shape.md Error on Invalid PostCSS Shape (#10244) 2020-01-23 16:27:07 -05:00
prefetch-true-deprecated.md fix: Warn when user specifies prefetch option as true (#8233) 2019-08-12 00:26:25 -04:00
prerender-error.md [WIP] Add err.sh for prerender error (#9548) 2019-11-27 10:54:57 +01:00
promise-in-next-config.md Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
public-next-folder-conflict.md Match public files priority in dev (#8641) 2019-09-16 23:06:30 +02:00
render-no-starting-slash.md Add warning when a page is rendered without a starting / (#11418) 2020-04-06 11:54:42 -05:00
reserved-page-prop.md Update url prop handling for pages with new data methods (#10653) 2020-02-26 13:26:55 -05:00
routes-must-be-array.md Show better error when non-array is returned from custom-routes (#10670) 2020-02-24 17:01:02 -05:00
ssg-fallback-true-export.md Add error when exporting pages with fallback: true (#13063) 2020-05-19 09:29:34 -04:00
static-dir-deprecated.md Add static directory deprecation warning (#8636) 2019-10-06 13:57:41 +02:00
threw-undefined.md Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
url-deprecated.md Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00