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

Build not working locally when using yarn 4.5.1 #3697

Open
harm-meijer opened this issue Jan 20, 2025 · 6 comments
Open

Build not working locally when using yarn 4.5.1 #3697

harm-meijer opened this issue Jan 20, 2025 · 6 comments

Comments

@harm-meijer
Copy link

After following the instructions

npx @commercetools-frontend/create-mc-app@latest \
  my-new-custom-view-project \
  --application-type custom-view \
  --template starter

I have the following line in my package.json: "packageManager": "[email protected]+sha512.341db9396b6e289fecc30cd7ab3af65060e05ebff4b3b47547b278b9e67b08f485ecd8c79006b405446262142c7a38154445ef7f17c1d5d1de7d90bf9ce7054d"

There are no errors and when I run yarn start it opens a browser but clicking the "Open the Custom View" button shows a popup with the following error: We could not find this Project

Image

"Seach for a project" does not fix the problem as it results in the error nesting in another popup.

Image

I replaced the packageManager in the package.json with "packageManager": "[email protected]" and removed yarn.lock, node_modules and .yarn then run yarn install (installing with yarn 1.22.22) then yarn start it'll open the browser and clicking the "Open the Custom View" button will open the custom view.

I am using:
nvm: 0.39.7
corepack: 0.29.3 (enabled corepack)
yarn: 1.22.22 (because of the added entry in package.json, it would previously default to 4.5.1)
node: v20.18.0

@emmenko
Copy link
Member

emmenko commented Jan 20, 2025

Hey @harm-meijer 👋

I'm not able to reproduce the issue. Can you try "clearing your site data" in Devtools > Application?

@harm-meijer
Copy link
Author

I successfully cleared site data and reloaded the page, this will popup "Accept all cookies" and logs in again but still would not open the custom view. Do you have the included "packageManager" entry in the package.json when you initially install the template? I think this may be something from corepack.

Image

@emmenko
Copy link
Member

emmenko commented Jan 20, 2025

I don't have the packageManager field in package.json

@emmenko
Copy link
Member

emmenko commented Jan 20, 2025

I have Yarn v1.22. I haven't tried with other Yarn versions.

What errors do you see in the console?

@harm-meijer
Copy link
Author

Image

No errors when installing or in building in the terminal

@harm-meijer
Copy link
Author

harm-meijer commented Mar 7, 2025

Here are some of the commands I used to reproduce this:

mkdir test
corepack enable
cd test
yarn set version 4.6.0
yarn -v
>> 4.6.0
rm package.json # if there is a package.json the yarn install will fail
yarn -v # should still be yarn 4.6, if not then you can try: corepack prepare [email protected] --activate
>> 4.6.0
npx @commercetools-frontend/create-mc-app@latest \
  my-new-custom-view-project \
  --application-type custom-view \
  --template starter
cd my-new-custom-view-project/
yarn run start

open custom view => could not find this project

Same error with mc custom app:

npx @commercetools-frontend/create-mc-app@latest \
  my-new-custom-application-project \
  --template starter

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

2 participants