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

Trying to import non-existing type in framework's source code #31171

Closed
azzazkhan opened this issue Nov 8, 2021 · 2 comments
Closed

Trying to import non-existing type in framework's source code #31171

azzazkhan opened this issue Nov 8, 2021 · 2 comments
Labels
bug Issue was opened via the bug report template.

Comments

@azzazkhan
Copy link

azzazkhan commented Nov 8, 2021

What version of Next.js are you using?

12.0.3

What version of Node.js are you using?

14.18.0

What browser are you using?

Chrome

What operating system are you using?

Windows 10

How are you deploying your application?

yarn build

Describe the Bug

The following error occurs while building by Next.js app locally.

$ yarn build
yarn run v1.22.17
$ next build
Failed to compile.

./node_modules/next/dist/server/config-shared.d.ts:1:15
Type error: '"next/dist/compiled/webpack/webpack"' has no exported member named 'webpack5'. Did you mean 'webpack'?

> 1 | import type { webpack5 } from 'next/dist/compiled/webpack/webpack';
    |               ^
  2 | import { Header, Redirect, Rewrite } from '../lib/load-custom-routes';
  3 | import { ImageConfig, ImageConfigComplete } from './image-config';
  4 | export declare type NextConfigComplete = Required<NextConfig> & {
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected Behavior

Should run normally

To Reproduce

Clone the repository.

@azzazkhan azzazkhan added the bug Issue was opened via the bug report template. label Nov 8, 2021
@azzazkhan azzazkhan changed the title Trying to import non-existing dependency in source code Trying to import non-existing type in framework's source code Nov 8, 2021
@ijjk
Copy link
Member

ijjk commented Nov 8, 2021

Closing as a duplicate of #30167

Note: this has been updated in v12.0.4-canary.0 of Next.js specifically this PR

@ijjk ijjk closed this as completed Nov 8, 2021
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants