Shopify / shopify-app-template-php

280 stars 90 forks source link

vite is not recognized when run cmd "npm run dev" fresh installation #471

Open waqas61 opened 1 year ago

waqas61 commented 1 year ago

Issue summary

I have installed new project using cmd

npm init @shopify/app@latest -- --template php

cd project-dir,

composer install ,

cp .env.example .env ,

php artisan key:generate ,

php artisan migrate

then cd .. from project directory

Finally run npm run dev

vite is not recognized as an internal or external command

rafaelstz commented 1 year ago

The issue is happening because you didn't run npm install in your project-dir/web/frontend.

waqas61 commented 1 year ago

@rafaelstz Thanks for your time I have followed repository

[README.md](https://github.com/Shopify/shopify-app-template-php#readme)

They did not mentioned run to run npm install

Issue resolved

Thank You

rafaelstz commented 1 year ago

@waqas61 I've created a PR to solve it.

nemwiper commented 1 year ago

The "web/frontend" element should be added in the workspaces array of the package.json root file es. "workspaces": [ "web/frontend", "extensions/*" ],