Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

unale to run app for the first time using npm run dev

oehc123
Shopify Partner
5 0 1

✔ ~/git/cheito/cheito-store [master L|✔]
11:19 $ npm run dev

> cheito-store@1.0.0 dev /Users/jsandoval/git/cheito/cheito-store
> shopify app dev

✔ Dependencies installed
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cheito-store@1.0.0 dev: `shopify app dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cheito-store@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jsandoval/.npm/_logs/2022-09-18T15_20_00_026Z-debug.log


The full logs are:
```

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/jsandoval/.nvm/versions/node/v14.18.2/bin/node',
1 verbose cli '/Users/jsandoval/.nvm/versions/node/v14.18.2/bin/npm',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.2
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle cheito-store@1.0.0~predev: cheito-store@1.0.0
6 info lifecycle cheito-store@1.0.0~dev: cheito-store@1.0.0
7 verbose lifecycle cheito-store@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle cheito-store@1.0.0~dev: PATH: /Users/jsandoval/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/jsandoval/git/cheito/cheito-store/node_modules/.bin:/Users/jsandoval/.fastlane/bin:/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin:/Users/jsandoval/.rbenv/bin:/Users/jsandoval/.nvm/versions/node/v14.18.2/bin:/Users/jsandoval/.yarn/bin:/Users/jsandoval/.config/yarn/global/node_modules/.bin:/Users/jsandoval/Scripts:~/bin/arcanist/bin:/Users/jsandoval/Library/Android/sdk/platform-tools:/Users/jsandoval/Library/Android/sdk/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/home/username/bin:/usr/local/homebrew:/Users/jsandoval/tizen-studio/tools:/Users/jsandoval/tizen-studio/tools/ide/bin:/Users/jsandoval/tizen-studio/tools:/Users/jsandoval/tizen-studio/tools/ide/bin:/usr/local/bin/eslint:/usr/local/bin:/Users/jsandoval/.npm-global/bin:/usr/local/Cellar/node/13.1.0/bin:/Users/jsandoval/.rvm/bin:/opt/apache-maven/bin:/Users/jsandoval/Library/Android/sdk/emulator:/Users/jsandoval/Library/Android/sdk/platform-tools
9 verbose lifecycle cheito-store@1.0.0~dev: CWD: /Users/jsandoval/git/cheito/cheito-store
10 silly lifecycle cheito-store@1.0.0~dev: Args: [ '-c', 'shopify app dev' ]
11 silly lifecycle cheito-store@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle cheito-store@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: cheito-store@1.0.0 dev: `shopify app dev`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/Users/jsandoval/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
13 verbose stack at ChildProcess.<anonymous> (/Users/jsandoval/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1058:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid cheito-store@1.0.0
15 verbose cwd /Users/jsandoval/git/cheito/cheito-store
16 verbose Darwin 21.6.0
17 verbose argv "/Users/jsandoval/.nvm/versions/node/v14.18.2/bin/node" "/Users/jsandoval/.nvm/versions/node/v14.18.2/bin/npm" "run" "dev"
18 verbose node v14.18.2
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error cheito-store@1.0.0 dev: `shopify app dev`
22 error Exit status 1
23 error Failed at the cheito-store@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
```
 
and my dependencies are:

```
{
"name": "cheito-store",
"version": "1.0.0",
"main": "web/index.js",
"license": "UNLICENSED",
"scripts": {
"shopify": "shopify",
"build": "shopify app build",
"dev": "shopify app dev",
"info": "shopify app info",
"generate": "shopify app generate",
"deploy": "shopify app deploy"
},
"dependencies": {
"@shopify/app": "3.12.0",
"@shopify/cli": "3.12.0"
},
"author": "jsandoval"
}
```
Accepted Solution (1)

Dzonotonas
Shopify Partner
12 1 6

This is an accepted solution.

Fixed. This helped me: https://shopify.dev/apps/tools/cli/commands#auth-logout

Also, I did this, but I think this is unnecessary (only for me needed): https://shopify.dev/apps/tools/cli/commands#ngrok-auth

 

 

View solution in original post

Replies 6 (6)

Dzonotonas
Shopify Partner
12 1 6

The same for me 😞 

oehc123
Shopify Partner
5 0 1

what is your node version?

 

jon551
Shopify Staff
28 7 5

Hi Oehc123,

 

To report issues with the Shopify CLI 3.x or to check up on resolutions for previous problems we recommend visiting the Shopify CLI 3.x Public GitHub repository's issue board here: [Shopify CLI 3.x GitHub issue board]

 

For starting new projects you may want to consider trying a newer version of node such as the 16.x series, as the 14.x series will be considered 'end-of-life' in spring 2023 [NodeJS Release Schedule].

 

Hope you have a great day,

Jon551 | API Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

oehc123
Shopify Partner
5 0 1

Hello @jon551 ,
Thanks so much for getting back.

I did not see any issues related to this topic in guthub issues as suggested 😞
unfotunatly, upgrading node version did not help fully.
I dont see the error anymore, but I get no output or error logs after the `npm run dev` command.

I would expect this command to start de server as in the documentation.

please see attached my logs:

✔ ~/git/joseDev
15:03 $ npm init @shopify/app@latest

Welcome. Let's get started by naming your app. You can change it later.
✔ Your app's name? · commercial-projection-app
✔ Which template would you like to use? · node
✔ Downloaded template from https://github.com/Shopify/shopify-app-template-node#cli_three
✔ App initialized
  ✔ Liquid parsed
  ✔ Updated package.json
✔ Dependencies installed with npm
  ✔ Installed dependencies in /
  ✔ Installed dependencies in /web/
  ✔ Installed dependencies in /web/frontend/
✔ Completed clean up
✔ Git repository initialized

  commercial-projection-app is ready for you to build! Remember to cd commercial-projection-app
  Check the setup instructions in your README file
  To preview your project, run npm run dev
  To add extensions, run npm run scaffold extension
  For more details on all that you can build, see the docs: shopify.dev ✨

  For help and a list of commands, enter npm run shopify app -- --help

✔ ~/git/joseDev
15:03 $ cd commercial-projection-app/
✔ ~/git/joseDev/commercial-projection-app [master L|…46]
15:03 $ npm run dev

> commercial-projection-app@1.0.0 dev
> shopify app dev

✔ Dependencies installed
✘-1 ~/git/joseDev/commercial-projection-app [master L|…46]
15:04 $

 

```

16:16 $ node -v
v16.17.0

```

@jon551 , why is the command not starting the server as expected in the documentation https://shopify.dev/apps/getting-started/create

?

 

Thanks

 

Dzonotonas
Shopify Partner
12 1 6

This is an accepted solution.

Fixed. This helped me: https://shopify.dev/apps/tools/cli/commands#auth-logout

Also, I did this, but I think this is unnecessary (only for me needed): https://shopify.dev/apps/tools/cli/commands#ngrok-auth

 

 

oehc123
Shopify Partner
5 0 1

Wow @Dzonotonas ,
I am not sure ow you came up with that idea, but that solved.
I spet 3days trying to figure it out, 
I installed and uninstalled so many tings 😞

I am glad is working now

Thanks so much for taking the time and sharing