If the three dependency is upgraded to version 0.125.0 and upwards, the following errors occur:
- Compilation error: Attempted import error: 'Geometry' is not exported from 'three'.
- ReferenceError: Blob is not defined.
Solution:
Upgrade drei to `2.2.21`.
Added port config variable to the migrate-db.js script and .env.local.example files. This allows users to set the port for remote databases like Digital Ocean that don't use the default port.
We would like to maintain a single `next-auth` example under our organization. This PR points readers of the Next.js docs to our repository, instead of `with-next-auth`
Also, as @kriscarle pointed out in https://github.com/nextauthjs/next-auth/issues/1132#issuecomment-772375650, we should maybe only maintain a single example to be able to keep it up-to-date more easily.
This PR does the following:
- Update documentation referencing @zeit/fetch to @vercel/fetch
- Switch packages @zeit/fetch to @vercel/fetch
- ~~Fix `browser.js` to actually use @vercel/fetch, it was only using unfetch directly before~~
- Update React to 17
- Change folder name and package name
The links for `emotion` and `emotion-server` in the emotion example's readme were 404ing.
After going to Emotion's repo, I noticed [the packages were renamed](https://github.com/emotion-js/emotion/issues/1635).
This PR updates the links: `emotion` -> `emotion/css` and `emotion-server` -> `emotion/server`
I met following warning message after invoking create-next-app for ` example/with-typescript-eslint-jest `:
```
% yarn dev
yarn run v1.22.10
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
warn - React 17.0.1 or newer will be required to leverage all of the upcoming features in Next.js 11. Read more: https://err.sh/next.js/react-version
event - compiled successfully
```
I have followed the instructions in the link, and this patch is. Please merge this.
Thank you for reading.
I realized while looking over this that the `autoprefixer` plugin isn't being used by postcss because it's not included in the `postcss.config.js`. Additionally, since `postcss-preset-env` doesn't support PostCSS 8 yet, and it includes PostCSS 7 as a dependency, I've removed that package.
There is an open issue to add PostCSS 8 support to `postcss-preset-env` [here](https://github.com/csstools/postcss-preset-env/issues/191). @kripod's comments on my other PR #20956 are what prompted me to check this out.
On a side note, it looks like all the CMS examples use Tailwind CSS v1 still, so that's something someone (possibly myself) could tackle later.
Get rid of the unmet peer dependency warning when installing
a next.js project wtih node-sass 5.
node-sass 5 is the currently maintained version and removes
support one deprecated API and Node.js versions that Next.js does
not support either. Next.js uses node-sass 5 in devDependencies.
node-sass changelog: https://github.com/sass/node-sass/releases
On the other hand, as the docs encourage the sass package instead of node-sass,
(see errors/duplicate-sass.md)
I have updated examples which used node-sass 4 to the latest sass instead.
Fixes#20474
* Switch API url to working URL used in apollo example
* Update deps
* Move styled jsx out of the way to avoid demonstrating too many
unfamiliar concepts at once
dev, build and start work now.
* Added with-mqtt-js example
* Fixed eslint/prettier errors
* Update README.md
* Updated with-mqtt-js to latest next/react versions, WIP: Refactoring useMqtt()
* A2PC
* Working example, unrefactored
* A2PC
* Ran prettier
* Used NEXT_PUBLIC_ prefix instead of keys as props
* Updated readme and added .env.local.example
Co-authored-by: Sebastian König <sebastian_koenig@cotyinc.com>
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Hi,
I'm submitting this PR for consideration as a new example app showing Styled JSX with SCSS working inside and outside storybook with example components.
Only known issue: I noticed that when running this example with:
`$ yarn next ./examples/with-storybook-styled-jsx-scss`
I receive the following error:
```
error - ./pages/_app.js
Error: [BABEL] .../next.js/examples/with-storybook-styled-jsx-scss/pages/_app.js: Cannot find module 'styled-jsx-plugin-sass' (While processing: ".../next.js/node_modules/next/babel.js")
```
However I notice that this same missing module error is triggered when running this existing example app "with-styled-jsx-scss".
Any changes/tweaks needed?
Thanks!
**What's the problem this PR addresses?**
`@next/mdx` adds the webpack loader `@mdx-js/loader` without resolving it to an absolute path
Depends on https://github.com/vercel/next.js/pull/17606
**How did you fix it?**
`require.resolve` the webpack loader before adding it
* Update dbConnect.js
The previous logic was in my opinion prone to errors in situations when different calls to this function from different locations may happen at the same time ( like a race condition ). If the readyState is anything but not 0, then we must not try to perform a new connection as this may cause consequent connections!
I hope this makes sense
* Update examples/with-mongodb-mongoose/utils/dbConnect.js
* Lint fix and minor changes
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
[DebugEngine stopped working](https://github.com/styletron/styletron/issues/366) with v9.5 since the devtool is strictly set to eval and this option is not customizable. Unfortunately there is currently no way to fix this.
* Update with-mongodb to be TypeScript-friendly
I slightly modified the approach so TypeScript can correctly infer types without actually having to type anything but the global:
**index.d.ts**
```ts
import { Db, MongoClient } from "mongodb";
declare global {
namespace NodeJS {
interface Global {
mongoCache: {
conn: {
client: MongoClient | null;
db: Db | null;
}
promise: Promise<MongoClient> | null;
};
}
}
}
```
* lint
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
I've looked at the example code and saw some consistent issues related to code style. The changes applied to this PR fixes the following points:
- Differences of line breaks styles between multiple files
- Differences of if statements styles
- Unnecessary comment
- A typo on a JSDocs
---
There were line breaks between statements on `pages/index.js`
````
export async function getServerSideProps(context) {
const { client } = await connectToDatabase()
const isConnected = await client.isConnected()
return {
props: { isConnected },
}
}
````
And this wasn't being applied to the MongoDB utility:
````
export async function connectToDatabase() {
if (cached.conn) return cached.conn
if (!cached.promise) {
const conn = {}
const opts = {
useNewUrlParser: true,
useUnifiedTopology: true,
}
{...}
````
And also, as shown in the snippet above, there are different styles of if statements being used.
With that being said, the reason I made this PR is because I think that this kind of inconsistent arises questions when a contributor looks to the codebase, even if this is a simple example.
Hi ✌️
I've seen that many people have problem with implement Google Tag Manager, I've created an example of how insert "Google Tag Manager" in a NextJs app