Node crashing when I run Shopify App Serve

First Time Building An App so please excuse me if I’m being a dunce here but I’ve tried repeatedly to get it past this point and it’s just not working. Following the instructions here getting to step 3: https://shopify.dev/apps/getting-started/create

  1. I see my app in my partner dashboard.

  2. I change directories into my app folder (I’ve done this both before and after creating a tunnel with same result)

  3. I create a tunnel with my token and it tells me .env saved to project root and then it asks me:

  4. Do you want to update your application url?

(Node crashes no matter what I chose)

5.Then I get the following output.

Any advice much appreciated.

[nodemon] 2.0.15
┃ [nodemon] to restart at any time, enter `rs`
┃ [nodemon] watching path(s): server/index.js
┃ [nodemon] watching extensions: js,mjs,json
┃ [nodemon] starting `node ./server/index.js`
┃ Browserslist: caniuse-lite is outdated. Please run:
┃ npx browserslist@latest --update-db
┃ 
┃ Why you should do it regularly:
┃ https://github.com/browserslist/browserslist#browsers-data-updating
┃ Browserslist: caniuse-lite is outdated. Please run:
┃ npx browserslist@latest --update-db
┃ node:internal/modules/cjs/loader:488
┃       throw e;
┃       ^
┃ 
┃ Error: Package subpath './lib/parser' is not defined by "exports" in /Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/node_modules/postcss/package.json
┃     at new NodeError (node:internal/errors:371:5)
┃     at throwExportsNotFound (node:internal/modules/esm/resolve:416:9)
┃     at packageExportsResolve (node:internal/modules/esm/resolve:669:3)
┃     at resolveExports (node:internal/modules/cjs/loader:482:36)
┃     at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
┃     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
┃     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
┃     at Module.require (node:internal/modules/cjs/loader:999:19)
┃     at require (node:internal/modules/cjs/helpers:102:18)
┃     at Object.552 (/Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11590)
┃     at __webpack_require__ (/Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11735)
┃     at Object.560 (/Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:400)
┃     at __webpack_require__ (/Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11735)
┃     at Object.290 (/Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:260)
┃     at __webpack_require__ (/Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11735)
┃     at Object.632 (/Users/macuser/Desktop/unsies/UnsieApp/unsie-builder/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:3733) {
┃   code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
┃ }
┃ 
┃ Node.js v17.0.1
┃ [nodemon] app crashed - waiting for file changes before starting...

This is working on a different computer so I think it is something with my system that is off. Also that ngrok runs after the first time automatically when you create node. Hope that helps other newbies.

Hi mate

I encountered the same problem.

But my problem was fixed by running :

npm audit fix --force

Before running the app

shopify app serve

Hope this can help :slightly_smiling_face:

After some searching myself it turns out Shopifys local dev tools are not compatible with node 17. The fix I found was to roll back my node version and use the long term support version with this command:

nvm install --lts

My output from that command looked like this:

Installing latest LTS version.
Downloading and installing node v16.13.2...
Downloading https://nodejs.org/dist/v16.13.2/node-v16.13.2-darwin-x64.tar.xz...
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v16.13.2 (npm v8.1.2)
Creating default alias: default -> lts/* (-> v16.13.2)

Then I ran shopify without issues:

shopify app serve

This sadly did not work for me but hopefully it can help others.

Sadly, did nothing for me. app serve still crashes intermittently.