Shopify / shopify-node-app

An example app that uses Polaris components and shopify-express
MIT License
328 stars 136 forks source link

nodemon keeps running the wrong scripts #124

Closed imgnx closed 6 years ago

imgnx commented 6 years ago

Whenever I try to run either npm start or yarn run start or nodemon ./bin/www, it starts running the same script over and over again while appending an extra ./bin/www to the end of the script.

PS C:\Users\donal\Desktop\Development\Dessero\shopify-node-app> yarn run start
yarn run v1.7.0
$ nodemon ./bin/www
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www`
Terminate batch job (Y/N)? y
PS C:\Users\donal\Desktop\Development\Dessero\shopify-node-app> nodemon ./bin/www
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www ./bin/www`
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `nodemon ./bin/www ./bin/www ./bin/www ./bin/www ./bin/www`
imgnx commented 6 years ago

I'm uninstalling and reinstalling nodemon. Apparently, I had forgotten to run npm install before trying to run npm start.

imgnx commented 6 years ago

Now I'm getting this:

internal/modules/cjs/loader.js:596
    throw err;
    ^

Error: Cannot find module '@shopify/shopify-express'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\donal\Desktop\Development\Dessero\shopify-node-app\server\index.js:17:24)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
[nodemon] app crashed - waiting for file changes before starting...
imgnx commented 6 years ago

Figured it out. Pretty sure it's because I'm on Windows. I had to uninstall and reinstall NVM.