Issue with running Foundation on a cloned (existing) site

Hi guys - really hoping someone can help me (there is beer in it!). I’m sure I’m doing something daft.
I’ve recently changed machine and I’m trying to get an existing site setup running on Parallels Windows on my Mac (as the site is Umbraco).

I’ve installed Foundation and if I create a new site all works / runs beautifully. However if I try to run Foundation Watch on the cloned Foundation folder I get an error as below.

I have to be honest while I feel like I know Foundation really well (proper love it!) I’m really not sure what I’m doing with NPM / yarn etc. I’ve never had a problem running folders in the past and these run just fine on my other machine.

If someone could gently point out where I’m going wrong I’d be super grateful. More than happy to tackle anyone’s CSS issues in return!

Thanks guys,

Rowena

Local modules not found in C:\Development\Ashfield\Ashfield.Web\04ed7397-f0ee-44c9-a246-9dfde59076e0\Foundation
[15:43:32] Try running: yarn install
Error: foundation-sites-template@1.0.0 start: gulp
Exit status 1
at EventEmitter. (C:\Users\rowenabellamy\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\lib\utils\lifecycle.js:217:16)
at EventEmitter.emit (events.js:198:13)
at ChildProcess. (C:\Users\rowenabellamy\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\npm\lib\utils\spawn.js:24:14)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

Literally just got this working as I posted this thread.
I needed to run npm install on the actual folder. Sorry everyone.

Admin - feel free to delete or I’m happy to add some more detail to help anyone who might have the same problem!

I guess you cloned / copied also the node_modules folder, which is normally in .gitignore and should not be copied. Running rm -rf node_modules and doing a npm ci or yarn will install from the relevant lockfiles.

Thanks for you reply Daniel - I didn’t, as they were properly gitignored - it was just a long time since I set it all up the first time and I realised my daftness about five minutes after I posted!

So for future, running those two commands is the correct way of doing this is that right?
Can I ask a stupid question and ask what the difference between npm ci and yarn is? This is so I can document all this for my future guys.

Thanks so much

Rowena

Correct, these commands are sufficient.

You can either use npm or yarn as package manager.
yarn by default installs from yarn.lock if there is any when you run yarn.

npm also installs from package-lock.json if npm ci (clean install) is used. This removes the node_modules folder and installes from the mentioned lockfile instead of overwriting it as the default npm i or npm install command often updates dependencies and overwrites the package-lock.json file.

Amazing thanks for your help Daniel - I owe you a beer.
I’m going to clone down to another folder just to test it all… make sure I (vaguely) know what I’m doing :slight_smile:

Thanks again!
Rowena