romano
4 months ago
350
3
General

NPM Commands vs. Ubuntu Commands

Posted 4 months ago by romano

Hi all, more of a general enquiry than a specific issue.

I've been using Laravel for about a year now and it's great that I've been able to able to have a pseudo understanding of what i'm doing. Something that trips me up is the understanding of when I need to prefix my commands with 'npm' or run it inside my Ubuntu virtual machine.

From the small experience i do have i can kinda look at a command i need to run take a guess as to what kind of command it is but it feels like using the terminal is kinda assumed knowledge and you just fumble you're way through it til it kinda clicks.

For instance, on this blog post (https://sandulat.com/blog/installing-tailwind-into-laravel/) about installing tailwind, when I see npm anywhere my brain just says to enter it into your project directory in my windows environment. So i do it. Then the next step says to run the command "./node_modules/.bin/tailwind init" and i understand by looking at that, that i should run it in my Ubuntu environment.

I don't really understand the difference apart from "npm is installed in my window and not my Ubuntu environment". Can someone please explain to me what I'm not understanding about the difference?

Please sign in or create an account to participate in this conversation.