What are differences between SystemJS and Webpack?

SystemJS works client side. It loads modules (files) dynamically on demand when they are needed. You don’t have to load the entire app up front. You could load a file, for example, inside a button click handler. SystemJS code: // example import at top of file import myModule from ‘my-module’ myModule.doSomething() // example dynamic import … Read more

Delete node_modules folder recursively from a specified path using command line

Print out a list of directories to be deleted: find . -name ‘node_modules’ -type d -prune Delete directories from the current working directory: find . -name ‘node_modules’ -type d -prune -exec rm -rf ‘{}’ + Alternatively you can use trash (brew install trash) for staged deletion: find . -name node_modules -type d -prune -exec trash … Read more

How to use paths in tsconfig.json?

This can be set up on your tsconfig.json file, as it is a TS feature. You can do like this: “compilerOptions”: { “baseUrl”: “src”, // This must be specified if “paths” is. … “paths”: { “@app/*”: [“app/*”], “@config/*”: [“app/_config/*”], “@environment/*”: [“environments/*”], “@shared/*”: [“app/_shared/*”], “@helpers/*”: [“helpers/*”] }, … Have in mind that the path where you … Read more

How to include scripts located inside the node_modules folder?

Usually, you don’t want to expose any of your internal paths for how your server is structured to the outside world. What you can is make a /scripts static route in your server that fetches its files from whatever directory they happen to reside in. So, if your files are in “./node_modules/bootstrap/dist/”. Then, the script … Read more

SyntaxError: Cannot use import statement outside a module

Verify that you have the latest version of Node.js installed (or, at least 13.2.0+). Then do one of the following, as described in the documentation: Option 1 In the nearest parent package.json file, add the top-level “type” field with a value of “module”. This will ensure that all .js and .mjs files are interpreted as … Read more

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