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

TypeError: Cannot read properties of undefined (reading 'minimalContext') #1166

Closed
2 tasks
monacodelisa opened this issue Jun 15, 2024 · 3 comments · Fixed by #1214
Closed
2 tasks

TypeError: Cannot read properties of undefined (reading 'minimalContext') #1166

monacodelisa opened this issue Jun 15, 2024 · 3 comments · Fixed by #1214
Labels
bug Something isn't working

Comments

@monacodelisa
Copy link
Contributor

monacodelisa commented Jun 15, 2024

Please provide the environment you discovered this bug in.

Analog version

v1.5.0

Tested on:

3 windows machines
1 stackblitz

https://stackblitz.com/github/analogjs/analog/tree/stackblitz/packages/create-analog/template-latest?file=vite.config.ts&preset=node

image

Which area/package is the issue in?

create-analog

Description

after running

  • npm create analog@latest
  • npm i
    and when running npm start the analog app starts
    however this error message appears :

Please provide the exception or error you saw

TypeError: Cannot read properties of undefined (reading 'minimalContext')
TypeError: Cannot read properties of undefined (reading 'minimalContext')

Other information

so far I know that this affects the styles:

  • the elements are no longer centered
  • the cool on hover box shadow on the Analog logo doesn't work
    and possibly more

I first encountered the error within the last 48h

  • 2 days ago I created a v1.5.0 Analog app without seeing this error message

As much as I would like to I could not submit a PR since I do not know where that
minimalContext is, could not find it

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@monacodelisa monacodelisa added the bug Something isn't working label Jun 15, 2024
@brandonroberts
Copy link
Member

The issue is the Angular CLI is pinned to 5.2.11 and using ^5.0.0 installs the latest version of Vite which is 5.3.0. This causes two copies of Vite to be installed.

The fix has already landed on beta but you can update your package.json for Vite to ~5.2.11

@monacodelisa
Copy link
Contributor Author

monacodelisa commented Jun 15, 2024

thank you so much @brandonroberts
I will make the suggested adjustments 🙏

  • all good now after changing

@brandonroberts
Copy link
Member

Landed a proper fix for this in #1214. It will go out with 1.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants