Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js v13 failed to build "TypeError: e.createContext is not a function" #157

Open
devinrhode2 opened this issue Aug 26, 2023 · 1 comment

Comments

@devinrhode2
Copy link

devinrhode2 commented Aug 26, 2023

search: https://github.com/Wildhoney/ReactShadow/issues?q=TypeError%3A+e.createContext+is+not+a+function

Code:

import root from 'react-shadow';
const ShadowDomRootDiv = root.div;

export const Foo = () => {
  return (
    <div>
      demo
      <ShadowDomRootDiv>shaded</ShadowDomRootDiv>
    </div>
  );
};
npm run build

> [email protected] build
> rimraf .next node_modules/.cache && next build

- info Creating an optimized production build  
- info Compiled successfully
- info Linting and checking validity of types  
- info Collecting page data ..TypeError: e.createContext is not a function
    at 7185 (/Users/drhode23/repos/bac/packages/nextjs-demo/.next/server/chunks/282.js:16257:11)
    at __webpack_require__ (/Users/drhode23/repos/bac/packages/nextjs-demo/.next/server/webpack-runtime.js:25:42)
    at 6669 (/Users/drhode23/repos/bac/packages/nextjs-demo/.next/server/app/page.js:592:20)
    at Function.__webpack_require__ (/Users/drhode23/repos/bac/packages/nextjs-demo/.next/server/webpack-runtime.js:25:42)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async collectGenerateParams (/Users/drhode23/repos/bac/packages/nextjs-demo/node_modules/next/dist/build/utils.js:826:17)

> Build error occurred
Error: Failed to collect page data for /
    at /Users/drhode23/repos/bac/packages/nextjs-demo/node_modules/next/dist/build/utils.js:1156:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error'
}
- info Collecting page data .%
@devinrhode2
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant