carstenlebek / shopify-node-app-starter

🚀🚀 A Shopify embedded app starter template, written in TypeScript with session storage, app context and examples for basic functionalities.
https://typescript-next-shopify-app.vercel.app
MIT License
172 stars 29 forks source link

Breaking changes in @shopify/cli-kit@3.40.0 #17

Open dylansmith opened 1 year ago

dylansmith commented 1 year ago

Firstly, thanks for this fantastic template. However, there are some breaking changes to the structure of the @shopify/cli-kit package introduced in it's 3.40.0 (minor?) version which are preventing the app from starting for npm users (since you only have a pnpm-lock.yml in the template).

error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/REDACTED/shopify-node-app-starter/node_modules/@shopify/cli-kit/dist/index.js' imported from /Users/REDACTED/shopify-node-app-starter/next.config.mjs
    at new NodeError (node:internal/errors:387:5)
    at finalizeResolution (node:internal/modules/esm/resolve:330:11)
    at moduleResolve (node:internal/modules/esm/resolve:907:10)
    at defaultResolve (node:internal/modules/esm/resolve:1115:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:841:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_MODULE_NOT_FOUND'

My workaround was simply to specify the 3.13.0 version locally, but hopefully this issue will help others in a similar situation.

swizzmagik commented 1 year ago

I ran into the same issue and this workaround fixed it for me.

arabovs commented 1 year ago

likewise, appreciate all your work !

mayankpal100dpanda commented 1 year ago

Use "@shopify/cli-kit": "3.13.1", just you need to remove ^ from cli-kit and Run npm i