How to run typescript compiler as a package.json script without grunt or gulp

“build”: “tsc main.ts dist/” Highly recommend you use tsconfig.json and then the -p compiler option to build your code. Look at: Compilation-Context Setup Here is the setup for using tsc with NPM scripts init npm init npm install typescript –save And then in your package.json add some scripts: “scripts”: { “build”: “tsc -p .”, “start”: … Read more

Why do Node modules go into .staging folder?

I was also facing the same issue, I tried the steps below: Delete package-lock.json Delete Node Modules folder Try installing it using below command (should be in open network) npm install Note: – “.staging” means, those dependencies are getting downloaded so for the temporary basis it keeps all those dependencies under “.staging” folder. Once all … Read more

Invalid options object. Dev Server has been initialized using an options object that does not match the API schema

Here is a workaround. Delete “proxy”: “http://localhost:6000”. Install package http-proxy-middleware with command npm install http-proxy-middleware –save. Create a file setupProxy.js inside your src folder or the root of your folder. Add these lines inside: const { createProxyMiddleware } = require(‘http-proxy-middleware’); module.exports = function(app) { app.use( ‘/api’, createProxyMiddleware({ target: ‘http://localhost:6000’, changeOrigin: true, }) ); }; Now, … Read more

‘package.json’ is not under ‘rootDir’

This is possible, and it turns out, not hard. The reason the solution is not obvious is because typescript relies on the rootDir to decide the directory structure of the output (see this comment from Typescript’s bossman), and only code included in the output or in package dependencies can be imported. If you set rootDir … Read more

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