What Are “npm run dev” and “npm run prod”

They are indeed the scripts as defined in the package.json file as you discovered. The values are run by your shell (so, for example, bash, zsh, etc. on UNIX-like operating systems). One key thing to note is that the node_modules/.bin directory is added to PATH before executing. So, in the case of the two scripts you’re asking about, cross-env can be found in node_modules/.bin (because it’s almost … Read more

How to write a .nvmrc file which automatically change node version

As @Aditya-M-P has already mentioned you can run the following command inside your projects root directory to generate the .nvmrc to set a desired NodeJS version for you project to work properly: It will generate something like this inside your .nvmrc file: Also using 10.16.2 without the v letter will work just fine. However, in the official documentation in the .nvmrc section it never mentions … Read more

npm – EPERM: operation not permitted on Windows

Running this command was my mistake. npm config set prefix /usr/local Path /usr/local is not for windows. This command changed the prefix variable at ‘C:\Program Files (x86)\Git\local’ To access and make a change to this directory I need to run my cmd as administrator. So I did: Run cmd as administrator Run npm config edit (You will get notepad editor) … Read more

What does the “as” keyword do?

That is not vanilla JavaScript, it is TypeScript. As any means consider the typed object as a plain untyped JavaScrpt object. The as keyword is a Type Assertion in TypeScript which tells the compiler to consider the object as another type than the type the compiler infers the object to be.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)