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

Million lint build error when configuring using webpack (TypeError: Cannot read properties of undefined (reading 'anya')) #1037

Open
uriklar opened this issue May 22, 2024 · 9 comments

Comments

@uriklar
Copy link

uriklar commented May 22, 2024

What version of million are you using?

1.0.0

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

Update: - Seeing same error with rspack

In my webpack (v.5.91.0) config I added:

import million from '@million/lint';
plugins: [
     million.webpack(),
     ... other plugins
    ]

And i'm getting this error:

/Users/uriklar/Code/MY_PROJECT/node_modules/unplugin/dist/webpack/loaders/transform.js:104
const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];
                                                                          ^

TypeError: Cannot read properties of undefined (reading 'anya')
 at Object.transform (/Users/uriklar/Code/MY_PROJECT/node_modules/unplugin/dist/webpack/loaders/transform.js:104:78)
 at LOADER_EXECUTION (/Users/uriklar/Code/MY_PROJECT/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
 at runSyncOrAsync (/Users/uriklar/Code/MY_PROJECT/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
 at iterateNormalLoaders (/Users/uriklar/Code/MY_PROJECT/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
 at /Users/uriklar/Code/MY_PROJECT/node_modules/loader-runner/lib/LoaderRunner.js:224:4
 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)
 ```

### What's the expected result?

The build to pass

### Link to Minimal Reproducible Example

https://stackblitz.com/sorry-cant-create-one-right-now

### Participation

- [X] I am willing to submit a pull request for this issue.
Copy link

Thanks for opening this issue! A maintainer will review it soon.

@RishabhTayal
Copy link

Same

@ganapativs
Copy link

Same issue here. Please look into this.

/Users/user/project/node_modules/.pnpm/unplugin@1.10.1/node_modules/unplugin/dist/webpack/loaders/transform.js:105

  if (typeof this.query === "string") {
    console.log(this.query); // ?unpluginName=anya
    const query = new URLSearchParams(this.query);
    unpluginName = query.get("unpluginName");
  } else {
    unpluginName = this.query.unpluginName;
  }
  const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName];

@grushetsky
Copy link

I have encountered the same problem.

@uriklar
Copy link
Author

uriklar commented Jul 22, 2024

Any news on this one? Thanks

@patik
Copy link

patik commented Oct 4, 2024

I'm also having this issue in my Next 14 app. It often happens with memoized components that have a custom equality function (arePropsEqual). It seems that arePropsEqual does not always receive the previous and next props.

@aidenybai
Copy link
Owner

@patik taking a look!

@uriklar
Copy link
Author

uriklar commented Oct 18, 2024

Any updates? 🙏

1 similar comment
@wjljack
Copy link

wjljack commented Nov 21, 2024

Any updates? 🙏

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

7 participants