Is there a way to use npm scripts to run tsc -watch && nodemon --watch?

I'm looking for a way to use npm scripts to run tsc --watch && nodemon --watch at the same time. I can run these commands independently, but when I want run both of them, only the first one is...

How do I run TypeScript files directly without generating any JavaScript files?

In TypeScript, you'd use the following command to enter watch mode: tsc -w -p . Then when tsc does detect a change, it'll transpile the .ts files and generate .js files. This means that you can...

TS cannot find modules

I have used https://github.com/FountainJS/generator-fountain-webapp to set up a new project using React & Typescript. I'm pretty comfortable with JS having used node for an ongoing project, but...

NPM install hangs when installing packages

I currently using a project. It works fine but the problem when I remove the project files(except node_modules) to another folder or GitHub, reinstalling packages via npm is not successful. It...

Angular No module factory available for dependency type: ContextElementDependency

Running ng build on my Angular 4 project give this error : 14% building modules 40/46 modules 6 active ...es\@angular\http\@angular\http.es5.js An error occured during the build: Error: No...

Webpack gives eslint errors while using npm link

I have a multi-package project set up, where I have one JavaScript package that relies on a TypeScript library. Initially I installed Sinopia and was reinstalling the library every time I made...

Module build failed: Error: Typescript emitted no output for

When I try to compile a .ts file I get the following error: Module build failed: Error: Typescript emitted no output for C:\xampp\htdocs\node-api\src\js\server.ts. at successLoader...

error TS2307: Cannot find module '@ng-bootstrap/ng-bootstrap'

I added NGBootstrap in angular 5 project. But after sometime it's not working and I am getting below error. Tried to resolve issue by upgrading CLI version but still issue is not resolve. Please...

Modules not found when using express

I want to expose REST service in electron app and I want to use expressJS with electron, as tutorial states I added express and @types/express. I tried to expose a "get " but when I build and run...

Typescript convert string in json to string literal

I have a json config file checked into my project that looks something like this: { "flag": "one" } and I want to check the type of this json file, with a type that includes string...

Cannot find name 'it' in Jest TypeScript

I try to create an intial setup for Jest in React + TypeScript. I have completed the initial setup and try to check whether the test runs. When I run the test using the command npm test, I am...

Ng serve throwing @angular/core/core has no exported member 'eeFactoryDef'

Im getting like 50 errors that all say that angular/core/core has no exported member 'eeFactoryDef'. They come from different node_modules, for example angular/cdk, ng-bootstrap, ngx-pipes,...

Jest watch not detecting changes to files

Running npm t -- --watch is not detecting changes to test files. If I run npm t or npm run test:changed (my script for only running tests that cover changed files via jest -o) everything works...

Mocha + TypeScript: Cannot use import statement outside a module

I was watching this video in order to learn how to add some simple tests to my Express routes but I am getting all kind of errors while executing a test. The error is: import * as chai from...

Cannot find module '@/assets/<file-name-here>.svg'. @vue/cli Version: 4.2.3 and 4.3.1

General jist: import Image from '@/assets/default-profile-picture.svg' //ERROR: Cannot find module '@/assets/default-profile-picture.svg'.Vetur(2307) I have spent the better part of today trying...

Can't run my Node.js Typescript project TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /app/src/App.ts

When I try to start my app on Heroku I got the following stack trace. It is just a basic ts.app like you see with ts-node and nodemon. If you need any more Infos just tell me that because it's my...

Svelte Component Testing with Jest, Unable to load Svelte files recursively

I am working on a Svelte Project with Typescript and want to use Jest to test UI components using the @testing-library/svelte module . I am not able to properly import all my svelte files like my...

Nest js packaging hangs at build process of the serverless framework

So i did a fresh install of nestjs application and i am trying to add the serverless framework with it.I also added few of the packages to support the serverless framework { "name": "n1", ...

Jest coverage in a node typescript project always returns empty

I am working on backend Typescript project when i am trying to get coverage report for unit test case,Jest returns empty coverage report in terminal as well as in html report stating nothing. i...

"inject() must be called from an injection context" when importing angular app using module federation architecture

I am trying to implement the micro-frontend concept in angular using webpack5 module federation by following this example Module federation with angular, but i am facing this error I tried the...

To load an ES module, set "type": "module" in the package.json or use the .mjs extension

I am trying to run on desktop this repository a vscode extension. I cloned it locally and run npm install Press f5 on vscode editor and got an error Process exited with code 1 (node:1404) Warning:...

Typescript Node JS - `Property does not exist on type 'Global & typeof globalThis'`

I have another NodeJS app built with typescript and global.d.ts file everything works fine but my new application is giving error while running with ts-node-dev ts-main-file.ts In new application...

React build - not found: Error: Can't resolve 'buffer'

I am having an error when I build my application in react. I noticed this error only when I tried to build application. When I stopped dev server and ran it again, it showed the same error. It...

npm install failing with "git dep preparation failed"

I am new to node and npm and am trying to setup my system with node and npm so that I can run a local project. After installing the latest version of node and npm, when I run the command npm...

Angular error on Ionic build: Cannot find module '@ionic/angular-toolkit/package.json'

When I run "ionic cordova build ios" I get the following error when ng is called: > ng run app:ionic-cordova-build:production --platform=ios 2021-09-29T09:57:54.068Z ng:analytics...

How do I fix this error when creating a candy machine with metaplex?

I am following this tutorial "https://www.youtube.com/watch?v=4LLx7SMAOag&t=446s" and at 9:28 he tells us to input this ts-node js/packages/cli/src/candy-machine-cli.ts upload ./assets --env...

Solana candy machine upload assets Error: memory allocation failed, out of memory

I was trying to upload testing content by ts-node src/candy-machine-cli.ts upload assets --env devnet --keypair "~\.config\solana\devnet.json" -n 10 And ran into error below Transaction...

Angular v13 Jest with nx test - SyntaxError: Cannot use import statement outside a module at Runtime.createScriptFromCode

I tried to follow every comment with a possible solution here to the letter. I relied on an example project on github as well which works perfectly. This also started to happen to me after...

Error: Cannot find module './candy-machine-cli.ts'

Im following a YouTube video about NFT minting and when I enter this: ts-node js/packages/cli/src/candy-machine-cli.ts upload ./assets --env devnet --keypair ~/.config/solana/devnet-test.json I...

TypeError: MiniCssExtractPlugin is not a constructor

[webpack-cli] TypeError: MiniCssExtractPlugin is not a constructor at module.exports (/home/andrey/smartadmin-app/webpack.config.js:70:9) at loadConfigByPath...