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

Error on running development server after installing latest version. #1192

Closed
4 of 5 tasks
Ulset opened this issue Jul 11, 2024 · 8 comments
Closed
4 of 5 tasks

Error on running development server after installing latest version. #1192

Ulset opened this issue Jul 11, 2024 · 8 comments

Comments

@Ulset
Copy link

Ulset commented Jul 11, 2024

Issue summary

Before opening this issue, I have:

  • Upgraded to the latest version of the relevant packages
    • @shopify/* package and version:
    • Node version:
    • Operating system:
  • Set { logger: { level: LogSeverity.Debug } } in my configuration, when applicable
  • Found a reliable way to reproduce the problem that indicates it's a problem with the package
  • Looked for similar issues in this repository
  • Checked that this isn't an issue with a Shopify API

After updated the @shopify/shopify-app-remix package to the next major version (3). I cant start the app with npm run dev anymore. I get the following error:

bilde

Downgrading to version 2.8.0 solves the error.

I orignally submitted this issue a few days ago, but you guys closed it with this comment: #1169 (comment)

I am currently using node version 21.7.2

Expected behavior

Being able to start the app

Actual behavior

Error on startup

Steps to reproduce the problem

  1. Install latest version
  2. run the npm run dev command

Debug logs

19:45:57 │ remix │
19:45:57 │ remix │ info building...
19:45:57 │ theme-extensions │
19:45:57 │ theme-extensions │ --------- Pushing theme files to App Ext. Host (5cb84c-Sanders-MacBook-Pro) (#134943277194) on weebe-testing.myshopify.com
19:45:57 │ theme-extensions │ Pushing theme... 0%
19:45:58 │ weebe-discount-function │ Done!
19:45:58 │ remix │ ✘ [ERROR] Expected ";" but found "with"
19:45:58 │ remix │
19:45:58 │ remix │ node_modules/@shopify/shopify-app-remix/dist/esm/react/components/AppProvider/AppProvider.mjs:3:59:
19:45:58 │ remix │ 3 │ ...I18n from '@shopify/polaris/locales/en.json' with { type: 'json' };
19:45:58 │ remix │ │ ~~~~
19:45:58 │ remix │ ╵ ;
19:45:58 │ remix │
19:45:58 │ remix │

@einzN
Copy link

einzN commented Jul 11, 2024

same issue here, prob related #1031

@lizkenyon
Copy link
Contributor

To support Node 22, we needed to drop Node 16. As well as limit the other versions to support import attributes. This is a feature that replaced import assertions, but had to be patched into later versions of Node 18 and 20.

So you will need to be on of of the following Node versions

{"node":"^18.20 || ^20.10 || >=21.0.0"}

@Ulset
Copy link
Author

Ulset commented Jul 12, 2024

Yes, and as stated in the issue im on node 21.7.2. Isnt my version supported since its '>=21.0.0'?

@Ulset
Copy link
Author

Ulset commented Jul 12, 2024

Tried upgrading node
bilde

Still facing the same issue
bilde

Guess youre right @einzN, but i dont understand how this isnt a bigger issue for other people. Shouldt this be a critical bug for all users?

@lizkenyon
Copy link
Contributor

This is tricky because I cannot reproduce this.

You would expect to get this error if you were on an Node version that did not support import attributes, but I do see your print out of the version that should be working.

It almost seems like your app is using a different version of Node, then what is being shown. Are you using nvm to switch your versions? Something else?

image image

@RubenRodrigo
Copy link

@Ulset I was facing the same issue while trying to migrate from remix.config to vite. I've update the shopify.web.toml -> commands part like this:

from:

[commands]
dev = "npm exec remix dev"

to:

[commands]
predev = "npx prisma generate"
dev = "npx prisma migrate deploy && npm exec remix vite:dev"

@Ulset
Copy link
Author

Ulset commented Jul 13, 2024

@RubenRodrigo I was not aware that i needed to use Vite, after converting it seems to build just fine.

Altough now i have a problem where every request gives me the "Error forwarding web request: AggregateError", did you have the same issue while migrating? Ive tried to remove the
[hmr_server] http_paths = ["/ping"]
From my shopify.web.toml file, but i still have the same issue.

@Ulset
Copy link
Author

Ulset commented Jul 13, 2024

Ive sucessfully managed to convert to vite and that solves my issue. I didnt know that vite was required to use v3. Thanks for the help guys <3

@Ulset Ulset closed this as completed Jul 18, 2024
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

4 participants