simplenotezy

simplenotezy

Who cares about the 10 finger system? The 6 finger system never failed me, and noone ever complained. 5 fingers in the hair, one on the keyboard, let's go!

Member Since 8 years ago

@constantsolutions , Copenhagen, Denmark

Experience Points
5
follower
Lessons Completed
5
follow
Lessons Completed
32
stars
Best Reply Awards
57
repos

142 contributions in the last year

Pinned
⚡ OAuth Service Provider for Laravel 4
⚡ WP Inline list edit
⚡ typeahead.js is a fast and fully-featured autocomplete library
⚡ JSON in JavaScript
⚡ PHP 5.3+ oAuth 1/2 Client Library
Activity
Oct
26
2 days ago
Activity icon
issue

simplenotezy issue comment gregnb/mui-datatables

simplenotezy
simplenotezy

disable rowsPerPageOptions or feed it less than 3 values

How can I disable rowsPerPageOptions? I tried messing with the custom footer but it did not work for me.

Thus far the only thing that has worked is to feed rowsPerPageOptions an nonarray value, which I do not prefer because it results in an error.

What I am looking for is to have there be no options to change the amount of rows, so even if I try putting just rowsPerPageOptions: [5] I end up getting the dropdown having the values of [5,15,100].

simplenotezy
simplenotezy

@gabrielliwerant However, that will generate this error now:

Material-UI: The page size `100` is not preset in the `rowsPerPageOptions`. Add it to show the pagination select. 
Oct
21
1 week ago
Activity icon
issue

simplenotezy issue comment mui-org/material-ui

simplenotezy
simplenotezy

[Migration] Unable to find the input element. It was resolved to [object HTMLDivElement] while an HTMLInputElement was expected.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

I am getting this error:

index.js:1 MUI: Unable to find the input element. It was resolved to [object HTMLDivElement] while an HTMLInputElement was expected.
Instead, Autocomplete expects an input element.

Make sure you have customized the input component correctly.

When I use autocomplete like this:

<Autocomplete
      freeSolo
      autoHighlight
      style={{ width: 350 }}
      open={open}
      onOpen={() => setOpen(true)}
      onClose={() => setOpen(false)}
      onChange={(_event, user) =>
        router.push(`/projects/${project.id}/users/${user.id}`)
      }
      onInputChange={(_event, newValue) => setValue(newValue)}
      isOptionEqualToValue={(option, optionTwo) => option.id === optionTwo.id}
      getOptionLabel={(user) => presentUser(user, project)}
      groupBy={(user) => capitalizeFirstLetter(user.userType)}
      options={options}
      loading={loading}
      renderInput={(params) => (
        <div ref={params.InputProps.ref}>
          <Input
            {...params.inputProps}
            variant="filled"
            className={classes.searchInput}
            classes={{ underline: classes.searchInputUnderline }}
            placeholder="Search"
            startAdornment={
              <InputAdornment position="start">
                <Search />
              </InputAdornment>
            }
            endAdornment={
              <>
                {loading ? (
                  <CircularProgress color="inherit" size={20} />
                ) : null}
                {params.InputProps.endAdornment}
              </>
            }
            type="text"
          />
        </div>
      )}
    />

It worked with v4. According to the documentation it seems like I am doing it correctly.

Expected Behavior 🤔

No errors should happen.

Context 🔦

Simply trying to upgrade to v5

Your Environment 🌎

Chrome.

`npx @mui/envinfo`
  System:
    OS: macOS 11.3.1
  Binaries:
    Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
    Yarn: 1.22.11 - /opt/homebrew/bin/yarn
    npm: 7.23.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 93.0.4577.82
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.1
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1
    @emotion/styled: ^11.3.0 => 11.3.0
    @mui/core:  5.0.0-alpha.49
    @mui/icons-material: ^5.0.1 => 5.0.1
    @mui/lab: ^5.0.0-alpha.49 => 5.0.0-alpha.49
    @mui/material: ^5.0.2 => 5.0.2
    @mui/private-theming:  5.0.1
    @mui/styled-engine:  5.0.1
    @mui/styles: ^5.0.1 => 5.0.1
    @mui/system:  5.0.2
    @mui/types:  7.0.0
    @mui/utils:  5.0.1
    @mui/x-data-grid: ^4.0.0 => 4.0.0
    @types/react:  17.0.22
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
simplenotezy
simplenotezy

So I managed to find the issue. This line:

      renderInput={(params) => (
        <Root ref={params.InputProps.ref}>
          <Input
            { ...params.inputProps }

Had to be changed to:

      renderInput={(params) => (
        <Root ref={params.InputProps.ref}>
          <Input
            inputProps={{ ...params.inputProps }}

Since I was using which itself is not directly an , but rather a div with an input inside

Activity icon
issue

simplenotezy issue comment mui-org/material-ui

simplenotezy
simplenotezy

[Migration] Unable to find the input element. It was resolved to [object HTMLDivElement] while an HTMLInputElement was expected.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

I am getting this error:

index.js:1 MUI: Unable to find the input element. It was resolved to [object HTMLDivElement] while an HTMLInputElement was expected.
Instead, Autocomplete expects an input element.

Make sure you have customized the input component correctly.

When I use autocomplete like this:

<Autocomplete
      freeSolo
      autoHighlight
      style={{ width: 350 }}
      open={open}
      onOpen={() => setOpen(true)}
      onClose={() => setOpen(false)}
      onChange={(_event, user) =>
        router.push(`/projects/${project.id}/users/${user.id}`)
      }
      onInputChange={(_event, newValue) => setValue(newValue)}
      isOptionEqualToValue={(option, optionTwo) => option.id === optionTwo.id}
      getOptionLabel={(user) => presentUser(user, project)}
      groupBy={(user) => capitalizeFirstLetter(user.userType)}
      options={options}
      loading={loading}
      renderInput={(params) => (
        <div ref={params.InputProps.ref}>
          <Input
            {...params.inputProps}
            variant="filled"
            className={classes.searchInput}
            classes={{ underline: classes.searchInputUnderline }}
            placeholder="Search"
            startAdornment={
              <InputAdornment position="start">
                <Search />
              </InputAdornment>
            }
            endAdornment={
              <>
                {loading ? (
                  <CircularProgress color="inherit" size={20} />
                ) : null}
                {params.InputProps.endAdornment}
              </>
            }
            type="text"
          />
        </div>
      )}
    />

It worked with v4. According to the documentation it seems like I am doing it correctly.

Expected Behavior 🤔

No errors should happen.

Context 🔦

Simply trying to upgrade to v5

Your Environment 🌎

Chrome.

`npx @mui/envinfo`
  System:
    OS: macOS 11.3.1
  Binaries:
    Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
    Yarn: 1.22.11 - /opt/homebrew/bin/yarn
    npm: 7.23.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 93.0.4577.82
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.1
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1
    @emotion/styled: ^11.3.0 => 11.3.0
    @mui/core:  5.0.0-alpha.49
    @mui/icons-material: ^5.0.1 => 5.0.1
    @mui/lab: ^5.0.0-alpha.49 => 5.0.0-alpha.49
    @mui/material: ^5.0.2 => 5.0.2
    @mui/private-theming:  5.0.1
    @mui/styled-engine:  5.0.1
    @mui/styles: ^5.0.1 => 5.0.1
    @mui/system:  5.0.2
    @mui/types:  7.0.0
    @mui/utils:  5.0.1
    @mui/x-data-grid: ^4.0.0 => 4.0.0
    @types/react:  17.0.22
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
simplenotezy
simplenotezy

@eps1lon In my case, I use a simple Create React App without SSR

Oct
18
1 week ago
Activity icon
issue

simplenotezy issue sass/migrator

simplenotezy
simplenotezy

"Nothing to migrate" - on Vue.js files

I'm working on a project, and on build we're getting this error:

: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($loader-size, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
58 │   margin-bottom: $loader-size/2;
   │                  ^^^^^^^^^^^^^^
   ╵
    pages/personalitytest/verify/_id.vue 58:18  root stylesheet

I wanted to use the migrator, but it doesn't seem to be compatible with Vue files. Is there a workaround to this?

Oct
5
3 weeks ago
Activity icon
issue

simplenotezy issue comment jpuri/react-draft-wysiwyg

simplenotezy
simplenotezy

ModuleNotFoundError: Module not found: Error: Can't resolve 'immutable' in '/usr/app/node_modules/react-draft-wysiwyg/dist'

ModuleNotFoundError: Module not found: Error: Can't resolve 'immutable' in '/usr/app/node_modules/react-draft-wysiwyg/dist'

anyone face this error in production?

simplenotezy
simplenotezy

I get the same error in production

Sep
30
4 weeks ago
Activity icon
issue

simplenotezy issue qqilihq/mongoose-slugger

simplenotezy
simplenotezy

(node:5927) UnhandledPromiseRejectionWarning: MongoError: user is not allowed to do action [serverStatus] on [admin.]

I am getting this error:

(node:5927) UnhandledPromiseRejectionWarning: MongoError: user is not allowed to do action [serverStatus] on [admin.]

Not sure why?

We're using atlas to host the mongodb

Sep
29
4 weeks ago
Activity icon
issue

simplenotezy issue mui-org/material-ui

simplenotezy
simplenotezy

[Migration] Unable to find the input element. It was resolved to [object HTMLDivElement] while an HTMLInputElement was expected.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

I am getting this error:

index.js:1 MUI: Unable to find the input element. It was resolved to [object HTMLDivElement] while an HTMLInputElement was expected.
Instead, Autocomplete expects an input element.

Make sure you have customized the input component correctly.

When I use autocomplete like this:

<Autocomplete
      freeSolo
      autoHighlight
      style={{ width: 350 }}
      open={open}
      onOpen={() => setOpen(true)}
      onClose={() => setOpen(false)}
      onChange={(_event, user) =>
        router.push(`/projects/${project.id}/users/${user.id}`)
      }
      onInputChange={(_event, newValue) => setValue(newValue)}
      isOptionEqualToValue={(option, optionTwo) => option.id === optionTwo.id}
      getOptionLabel={(user) => presentUser(user, project)}
      groupBy={(user) => capitalizeFirstLetter(user.userType)}
      options={options}
      loading={loading}
      renderInput={(params) => (
        <div ref={params.InputProps.ref}>
          <Input
            {...params.inputProps}
            variant="filled"
            className={classes.searchInput}
            classes={{ underline: classes.searchInputUnderline }}
            placeholder="Search"
            startAdornment={
              <InputAdornment position="start">
                <Search />
              </InputAdornment>
            }
            endAdornment={
              <>
                {loading ? (
                  <CircularProgress color="inherit" size={20} />
                ) : null}
                {params.InputProps.endAdornment}
              </>
            }
            type="text"
          />
        </div>
      )}
    />

It worked with v4. According to the documentation it seems like I am doing it correctly.

Expected Behavior 🤔

No errors should happen.

Context 🔦

Simply trying to upgrade to v5

Your Environment 🌎

Chrome.

`npx @mui/envinfo`
  System:
    OS: macOS 11.3.1
  Binaries:
    Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
    Yarn: 1.22.11 - /opt/homebrew/bin/yarn
    npm: 7.23.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 93.0.4577.82
    Edge: Not Found
    Firefox: Not Found
    Safari: 14.1
  npmPackages:
    @emotion/react: ^11.4.1 => 11.4.1
    @emotion/styled: ^11.3.0 => 11.3.0
    @mui/core:  5.0.0-alpha.49
    @mui/icons-material: ^5.0.1 => 5.0.1
    @mui/lab: ^5.0.0-alpha.49 => 5.0.0-alpha.49
    @mui/material: ^5.0.2 => 5.0.2
    @mui/private-theming:  5.0.1
    @mui/styled-engine:  5.0.1
    @mui/styles: ^5.0.1 => 5.0.1
    @mui/system:  5.0.2
    @mui/types:  7.0.0
    @mui/utils:  5.0.1
    @mui/x-data-grid: ^4.0.0 => 4.0.0
    @types/react:  17.0.22
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
Sep
22
1 month ago
Activity icon
issue

simplenotezy issue tanem/react-nprogress

simplenotezy
simplenotezy

Standard create-react-app, non-typescript example?

I miss a small demo of how this can be implemented into a non-typescript CRA.

Currently migrating an app from Next.js to CRA, and the setup seems overly complicated compared to https://github.com/apal21/nextjs-progressbar

Sep
21
1 month ago
Activity icon
issue

simplenotezy issue comment vercel/next.js

simplenotezy
simplenotezy

Fetch API cannot load file:///path/to/react-dom-server.node.development.js. URL scheme must be "http" or "https" for CORS request.

Bug Report

Describe the bug

Cannot fetch <script src="..."/> on client successfully, encountering CORS issue, similar to #6374.

Fetch API cannot load file:///D:/_projects/next-learn-demo/6-fetching-data/node_modules/react-dom/cjs/react-dom-server.node.development.js. URL scheme must be "http" or "https" for CORS request.

To Reproduce

  1. Clone https://github.com/jdmallen/next-learn-demo
  2. Checkout branch fetch-cors-bug.
  3. Navigate to ./6-fetching-data
  4. Execute npm i && npm run dev

Expected Behavior

Runs script on client.

Screenshots

System Information

  • Windows 10 1809
  • Chrome 79.0.3945.117 (Official Build) (64-bit)
  • Next 9.1.7
  • Project dependencies: "isomorphic-unfetch": "^3.0.0", "next": "^9.0.0", "react": "^16.8.4", "react-dom": "^16.8.4"

Additional context

All I did was change MyLayout to use a higher order function withLayout as suggested in your tutorial here and update each file to use it as shown in this fork.

Without withLayout-- i.e. just using <Layout>...</Layout> component-- it works as expected.

Related to issue #6374, but this time only using packages referenced by your tutorial. Please advise. Thanks!

simplenotezy
simplenotezy

It is not solved @Timer. Can confirm I experience this with 11.1.2

Sep
15
1 month ago
Activity icon
issue

simplenotezy issue comment vercel/next.js

simplenotezy
simplenotezy

next export fails Error: Minified React error #321; (Object.exports.useContext)

What version of Next.js are you using?

11.1.2

What version of Node.js are you using?

v16.6.2 (also tried v12.22.1, and v14.17.1)

What browser are you using?

Chrome

What operating system are you using?

macOS (M1 - ARM)

How are you deploying your application?

next export

Describe the Bug

Build is failing when running next export, even with a very simple setup

[me:~/Projects/nextjs-build-error]$ rm -rf node_modules && rm -rf .next && npm install && NODE_ENV=development next build && next export                                       (main)
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 504 packages, and audited 505 packages in 3s

82 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
info  - Loaded env from /Users/me/Projects/nextjs-build-error/.env.local
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
warn  - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
info  - Checking validity of types
warn  - No ESLint configuration detected. Run next lint to begin setup
info  - Creating an optimized production build
info  - Compiled successfully
info  - Collecting page data
[    ] info  - Generating static pages (0/3)
Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.development.js:1476:13)
    at Object.useContext (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.development.js:1484:20)
    at Head (/Users/me/Projects/nextjs-build-error/node_modules/next/dist/shared/lib/head.js:170:34)
    at processChild (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
    at resolve (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
    at ReactDOMServerRenderer.render (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
    at ReactDOMServerRenderer.read (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
    at Object.renderToString (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
    at Object.renderPage (/opt/homebrew/lib/node_modules/next/dist/server/render.js:596:45)
    at Function.getInitialProps (/Users/me/Projects/nextjs-build-error/.next/server/chunks/303.js:602:19)

Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.development.js:1476:13)
    at Object.useContext (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.development.js:1484:20)
    at Head (/Users/me/Projects/nextjs-build-error/node_modules/next/dist/shared/lib/head.js:170:34)
    at processChild (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
    at resolve (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
    at ReactDOMServerRenderer.render (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
    at ReactDOMServerRenderer.read (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
    at Object.renderToString (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
    at Object.renderPage (/opt/homebrew/lib/node_modules/next/dist/server/render.js:596:45)
    at Function.getInitialProps (/Users/me/Projects/nextjs-build-error/.next/server/chunks/303.js:602:19)

Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.development.js:1476:13)
    at Object.useContext (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.development.js:1484:20)
    at Head (/Users/me/Projects/nextjs-build-error/node_modules/next/dist/shared/lib/head.js:170:34)
    at processChild (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
    at resolve (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
    at ReactDOMServerRenderer.render (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
    at ReactDOMServerRenderer.read (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
    at Object.renderToString (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
    at Object.renderPage (/opt/homebrew/lib/node_modules/next/dist/server/render.js:596:45)
    at Function.getInitialProps (/Users/me/Projects/nextjs-build-error/.next/server/chunks/303.js:602:19)
info  - Generating static pages (3/3)

> Build error occurred
Error: Export encountered errors on following paths:
	/
	/404
	/500
    at /opt/homebrew/lib/node_modules/next/dist/export/index.js:487:19
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Span.traceAsyncFn (/opt/homebrew/lib/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async /opt/homebrew/lib/node_modules/next/dist/build/index.js:833:17
    at async Span.traceAsyncFn (/opt/homebrew/lib/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async /opt/homebrew/lib/node_modules/next/dist/build/index.js:707:13
    at async Span.traceAsyncFn (/opt/homebrew/lib/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async Object.build [as default] (/opt/homebrew/lib/node_modules/next/dist/build/index.js:77:25)

To Reproduce

https://github.com/simplenotezy/nextjs-export-error

  1. Pull down,
  2. Run npm install
  3. Run next build
  4. Run next export here's the error.
simplenotezy
simplenotezy

OK, so a follow up here. After hours of trying different things, it seems to make the difference if I do npm run build instead of next build. Here's an example:

[me:~/Projects/nextjs-build-error]$ next build                                                                                                                                                     (main✱)
info  - Loaded env from /Users/me/Projects/nextjs-build-error/.env.local
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
warn  - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
info  - Checking validity of types
warn  - No ESLint configuration detected. Run next lint to begin setup
info  - Creating an optimized production build
info  - Compiled successfully
info  - Collecting page data
[    ] info  - Generating static pages (0/3)
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at S (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.production.min.js:18:327)
    at Object.exports.useContext (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.production.min.js:22:269)
    at Html (/Users/me/Projects/nextjs-build-error/.next/server/chunks/303.js:624:19)
    at d (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498)
    at bb (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16)
    at a.b.render (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43)
    at a.b.read (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83)
    at Object.exports.renderToStaticMarkup (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:51:446)
    at renderToHTML (/opt/homebrew/lib/node_modules/next/dist/server/render.js:711:41)
    at async /opt/homebrew/lib/node_modules/next/dist/export/worker.js:273:36

Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at S (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.production.min.js:18:327)
    at Object.exports.useContext (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.production.min.js:22:269)
    at Html (/Users/me/Projects/nextjs-build-error/.next/server/chunks/303.js:624:19)
    at d (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498)
    at bb (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16)
    at a.b.render (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43)
    at a.b.read (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83)
    at Object.exports.renderToStaticMarkup (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:51:446)
    at renderToHTML (/opt/homebrew/lib/node_modules/next/dist/server/render.js:711:41)
    at async /opt/homebrew/lib/node_modules/next/dist/export/worker.js:273:36

Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at S (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.production.min.js:18:327)
    at Object.exports.useContext (/Users/me/Projects/nextjs-build-error/node_modules/react/cjs/react.production.min.js:22:269)
    at Html (/Users/me/Projects/nextjs-build-error/.next/server/chunks/303.js:624:19)
    at d (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498)
    at bb (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16)
    at a.b.render (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43)
    at a.b.read (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83)
    at Object.exports.renderToStaticMarkup (/opt/homebrew/lib/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:51:446)
    at renderToHTML (/opt/homebrew/lib/node_modules/next/dist/server/render.js:711:41)
    at async /opt/homebrew/lib/node_modules/next/dist/export/worker.js:273:36
info  - Generating static pages (3/3)

> Build error occurred
Error: Export encountered errors on following paths:
	/
	/404
	/500
    at /opt/homebrew/lib/node_modules/next/dist/export/index.js:487:19
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Span.traceAsyncFn (/opt/homebrew/lib/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async /opt/homebrew/lib/node_modules/next/dist/build/index.js:833:17
    at async Span.traceAsyncFn (/opt/homebrew/lib/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async /opt/homebrew/lib/node_modules/next/dist/build/index.js:707:13
    at async Span.traceAsyncFn (/opt/homebrew/lib/node_modules/next/dist/telemetry/trace/trace.js:60:20)
    at async Object.build [as default] (/opt/homebrew/lib/node_modules/next/dist/build/index.js:77:25)
[me:~/Projects/nextjs-build-error]$ npm run build                                                                                                                                                  (main✱)

> [email protected] build
> next build

info  - Loaded env from /Users/me/Projects/nextjs-build-error/.env.local
info  - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
warn  - Detected next.config.js, no exported configuration found. https://nextjs.org/docs/messages/empty-configuration
info  - Checking validity of types
warn  - No ESLint configuration detected. Run next lint to begin setup
info  - Creating an optimized production build
info  - Compiled successfully
info  - Collecting page data
info  - Generating static pages (3/3)
info  - Finalizing page optimization

Page                             Size     First Load JS
┌ ○ /                            265 B          65.7 kB
├   /_app                        0 B            65.5 kB
└ ○ /404                         1.36 kB        66.8 kB
+ First Load JS shared by all    65.5 kB
  ├ chunks/framework.923004.js   42 kB
  ├ chunks/main.c03421.js        20.2 kB
  ├ chunks/pages/_app.2d4e5c.js  2.49 kB
  └ chunks/webpack.672781.js     766 B

λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)  automatically rendered as static HTML (uses no initial props)
●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
   (ISR)     incremental static regeneration (uses revalidate in getStaticProps)
Activity icon
issue

simplenotezy issue vercel/next.js

simplenotezy
simplenotezy

next export fails Error: Minified React error #321; (Object.exports.useContext)

What version of Next.js are you using?

11.1.2

What version of Node.js are you using?

v16.6.2

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

next export

Describe the Bug

Build is failing when running next export, even with a very simple setup

Expected Behavior

It should work

To Reproduce

https://github.com/simplenotezy/nextjs-export-error

  1. Pull down,
  2. Run npm install
  3. Run next build
  4. Run next export here's the error.
Sep
9
1 month ago
Activity icon
issue

simplenotezy issue jemise111/react-native-swipe-list-view

simplenotezy
simplenotezy

Delete only when touch is released

I looked at the example here: https://snack.expo.dev/@jemise111/react-native-swipe-list-view, specifically swipe_to_delete.js.

  1. How can the example know that the user released the finger? Naturally, you don't want to trigger a deletion event, before the finger is released. Say the user just swiped, and then changed his mind, and moves the swipe "back" to its position. The demo takes care of this perfectly, I just don't seem to be able to replicate a similar approach in my project - nor do I understand how the example actually handles it. I know the example works, I just don't know how.

  2. What's the reason behind: if ( value < -Dimensions.get('window').width)? I would perhaps write it as: if ( value > (Dimensions.get('window').width / 2) ) {, so a deletion only should be triggered if the item was swiped more than half way through the screen

Activity icon
issue

simplenotezy issue comment jemise111/react-native-swipe-list-view

simplenotezy
simplenotezy

Delete only when touch is released

I looked at the example here: https://snack.expo.dev/@jemise111/react-native-swipe-list-view, specifically swipe_to_delete.js.

  1. How can the example know that the user released the finger? Naturally, you don't want to trigger a deletion event, before the finger is released. Say the user just swiped, and then changed his mind, and moves the swipe "back" to its position. The demo takes care of this perfectly, I just don't seem to be able to replicate a similar approach in my project - nor do I understand how the example actually handles it. I know the example works, I just don't know how.

  2. What's the reason behind: if ( value < -Dimensions.get('window').width)? I would perhaps write it as: if ( value > (Dimensions.get('window').width / 2) ) {, so a deletion only should be triggered if the item was swiped more than half way through the screen

simplenotezy
simplenotezy

@jemise111 I definitely makes a lot of sense; thank you. Based on your input I've managed to tweak my app to perform even better, so thanks.

I'll close the issue. And oh, may I suggest you perhaps enable "Discussions" for your repo? Perhaps that would help close a lot of issues that's basically just questions like mine.

Sep
8
1 month ago
Activity icon
issue

simplenotezy issue jpuri/draftjs-to-markdown

simplenotezy
simplenotezy

markdown-to-draftjs

Is it possible to revert the process?

Activity icon
issue

simplenotezy issue jpuri/react-draft-wysiwyg

simplenotezy
simplenotezy

Hiding strike-through?

How can I hide strike-through? I'd like to have only Bold & Underline.

Currently this:

    toolbar={{
      options: ['inline'],
    }}

Will show everything. Only way I can think of is adding classNames that hides the icon, but that seems like a workaround

Activity icon
issue

simplenotezy issue comment jpuri/react-draft-wysiwyg

simplenotezy
simplenotezy

Hiding strike-through?

How can I hide strike-through? I'd like to have only Bold & Underline.

Currently this:

    toolbar={{
      options: ['inline'],
    }}

Will show everything. Only way I can think of is adding classNames that hides the icon, but that seems like a workaround

simplenotezy
simplenotezy

Like so:

    toolbar={{
      options: ['inline'],
      inline: {
        options: ['bold', 'italic', 'underline'],
      },
    }}
Activity icon
issue

simplenotezy issue jpuri/react-draft-wysiwyg

simplenotezy
simplenotezy

Hiding strike-through?

How can I hide strike-through? I'd like to have only Bold & Underline.

Currently this:

    toolbar={{
      options: ['inline'],
    }}

Will show everything. Only way I can think of is adding classNames that hides the icon, but that seems like a workaround

Sep
7
1 month ago
Activity icon
issue

simplenotezy issue comment nextauthjs/next-auth

simplenotezy
simplenotezy

Make `next-auth` work with other Frameworks (Vite, Vue, ...)

Follow up of https://twitter.com/balazsorban44/status/1410641689715347461.

cc @s-kris @balazsorban44

next-auth can actually already be used with Vite today thanks to https://github.com/s-kris/vite-ssr-next-auth.

simplenotezy
simplenotezy

Pretty neat - looking to integrate Next-auth into an Express API, so would be happy to test this out and deliver feedback

Sep
6
1 month ago
Activity icon
issue

simplenotezy issue comment jemise111/react-native-swipe-list-view

simplenotezy
simplenotezy

Delete only when touch is released

I looked at the example here: https://snack.expo.dev/@jemise111/react-native-swipe-list-view, specifically swipe_to_delete.js.

  1. How can the example know that the user released the finger? Naturally, you don't want to trigger a deletion event, before the finger is released. Say the user just swiped, and then changed his mind, and moves the swipe "back" to its position. The demo takes care of this perfectly, I just don't seem to be able to replicate a similar approach in my project - nor do I understand how the example actually handles it. I know the example works, I just don't know how.

  2. What's the reason behind: if ( value < -Dimensions.get('window').width)? I would perhaps write it as: if ( value > (Dimensions.get('window').width / 2) ) {, so a deletion only should be triggered if the item was swiped more than half way through the screen

simplenotezy
simplenotezy

OK, so I managed to use swipeGestureBegan and swipeGestureEnded and then only trigger the "delete" event when isSwiping is false.

      swipeGestureEnded={() => setIsSwiping(false)}
      swipeGestureBegan={() => setIsSwiping(true)}

However, it's still a mystery how the demo works, without using a state like I had to do, so would really appreciate an answer as to how it really works.

Activity icon
issue

simplenotezy issue comment jemise111/react-native-swipe-list-view

simplenotezy
simplenotezy

Delete only when touch is released

I looked at the example here: https://snack.expo.dev/@jemise111/react-native-swipe-list-view, specifically swipe_to_delete.js.

  1. How can the example know that the user released the finger? Naturally, you don't want to trigger a deletion event, before the finger is released. Say the user just swiped, and then changed his mind, and moves the swipe "back" to its position. The demo takes care of this perfectly, I just don't seem to be able to replicate a similar approach in my project - nor do I understand how the example actually handles it. I know the example works, I just don't know how.

  2. What's the reason behind: if ( value < -Dimensions.get('window').width)? I would perhaps write it as: if ( value > (Dimensions.get('window').width / 2) ) {, so a deletion only should be triggered if the item was swiped more than half way through the screen

simplenotezy
simplenotezy

@jemise111 You must be busy, but could you point me in any direction? As a workaround I experimented around with using state to detect onPressOut, however, as soon as you start to slide, onPressOut (on touchablehighlight) is fired.

Sep
3
1 month ago
Activity icon
issue

simplenotezy issue roots/sage

simplenotezy
simplenotezy

Deprecated: Method ReflectionParameter::getClass() is deprecated

Versions

sage: 9.0.10 php: 7.4.22

Aug
30
1 month ago
Activity icon
issue

simplenotezy issue comment laracasts/Laravel-5-Generators-Extended

simplenotezy
simplenotezy

fixed issue with array_map() expects parameter 1 to be a valid callback, class 'Str' not found in getSortedSingularTableNames

fixed ErrorException : array_map() expects parameter 1 to be a valid callback, class 'Str' not found in PivotMigrationMakeCommand.php located at function getSortedSingularTableNames on line 171

simplenotezy
simplenotezy

If you're impatient like me, add this to your composer.json and run composer update then you should be able to receive the fork from @YosefOberlander:

"require-dev": {
	"laracasts/generators": "dev-master", // change this to dev-master
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/YosefOberlander/Laravel-5-Generators-Extended"
    }
],
Activity icon
issue

simplenotezy issue comment laracasts/Laravel-5-Generators-Extended

simplenotezy
simplenotezy

fixed issue with array_map() expects parameter 1 to be a valid callback, class 'Str' not found in getSortedSingularTableNames

fixed ErrorException : array_map() expects parameter 1 to be a valid callback, class 'Str' not found in PivotMigrationMakeCommand.php located at function getSortedSingularTableNames on line 171

simplenotezy
simplenotezy

I face the same error, would be great to get pulled in 😊

Aug
29
1 month ago
Activity icon
issue

simplenotezy issue barryvdh/laravel-ide-helper

simplenotezy
simplenotezy

There are no commands defined in the "ide-helper" namespace.

Versions:

  • ide-helper Version: 2.10
  • Lumen Version: 8
  • PHP Version: 7.4.22

Question:

I am getting this error:

There are no commands defined in the "ide-helper" namespace.

I have tried following the installation guide here. https://github.com/barryvdh/laravel-ide-helper#adding-additional-facades

Also VSCode complains about this:

Undefined method 'userFromToken'.intelephense(1013)

image

But the code works just fine.

I am not sure what I am missing here

Similar issues: https://github.com/barryvdh/laravel-ide-helper/issues/829

Previous