Having trouble with 'npm <script-command>' not working? Try changing it to 'npm run-script <script-command>' instead

Currently, I am configuring a node js backend to operate on TS for the first time within a mono-repo that has a specific folder structure. You can view the structure here.

The package.json file is located in the main directory as shown below:

   "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test",
      "eject": "react-scripts eject",
      "dev": "concurrently \"npx tsc --watch\" \"nodemon -q backend/index.js\""
  },

Prior to implementing concurrently and TypeScript, simply running npm dev would initiate my servers without any issues.

However, after this setup, I now need to use npm run-script dev instead. I'm interested to know why this change occurred and where one could adjust it if necessary.

Thank you in advance.

Answer №1

npm run dev happens to be the most concise option at the moment!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What could be causing the Goodreads API to return undefined in response to my request?

I'm currently experimenting with the request module in NPM and encountering an issue where it returns undefined. I believe I am utilizing xml2js correctly, but could my misuse of the 'form' option in the request module be causing this proble ...

Can you pass a generic type as a parameter for another generic in Java?

Simply provide a generic type like a callback: type FUNC<ARG,RET, F> = (arg: ARG) => F<RET>; type PROMISE<T> = Promise<T>; type IDENT<T> = T; type A = FUNC<number, void, IDENT>; type A_PROMISE = FUNC<number, void, ...

Angular 2 - Changes in component properties not reflected in view

I'm currently delving into Angular 2 and as far as I know, interpolated items in the view are supposed to automatically update when their corresponding variable changes in the model. However, in the following code snippet, I'm not observing this ...

Tips on incorporating express-mysql-session in a TypeScript project

I'm experimenting with using express-session and express-mysql-session in a Typescript project. Here's the relevant snippet of my code: import * as express from "express"; import * as expressSession from "express-session"; import * as expressMyS ...

Angular 8: How to Retrieve Query Parameters from Request URL

Can I retrieve the GET URL Query String Parameters from a specific URL using my Angular Service? For example, let's say I have a URL = "http:localhost/?id=123&name=abc"; or URL = ""; // in my service.ts public myFunction(): Observale<any> ...

Is it Possible to Install Compass Using NPM and Execute it via Command Line?

When using most NPM packages, you can run their command line application by executing it from the bin folder within the package's directory in node_modules: npm install foo ./node_modules/foo/bin/foo Although, it is simpler to install the package gl ...

Eliminate the chosen and marked items from a list - Angular 2+/ Ionic 2

Currently, I have a checkbox list on my page. Whenever a user selects the "Save" button, the checked items should be removed from the list and moved to the saved tab that is also displayed. While I have successfully implemented the functionality for removi ...

Avoid including package-lock.json file in GitHub contribution history

After the release of npm v5.0.0, utilizing npm packages automatically generates a package-lock.json file when running npm install. In my situation, my package-lock.json document is almost 10,000 lines long. Npm advises that this file should be committed: ...

The function "overloading" of the union type is not functioning properly

I attempted to "overload" a function by defining it as a union function type in order to have the type of the input parameter dictate the type of the `data` property in the returned object. However, this resulted in an error: type FN1 = (a: string) => { ...

Before the service call finishes, Akita queries this.selectAll and returns an empty list

Here is the code snippet from my file named widgetquery.ts: @Injectable({ providedIn: 'root' }) export class WidgetQuery extends QueryEntity<WidgetState, WidgetTO> { public Widget$: Observable<WidgetTO> = this.selectActive().filter( ...

What could be the reason for Jest's failure to execute tests involving npm packages?

I recently started a new project using the create-react-library package. In an attempt to add unit tests with Jest and Enzyme, I encountered an issue. While my test functions properly for a basic component, it fails when trying to test a component that inc ...

Is there a way to position the Image component from next/image using absolute positioning?

Is it possible to use an element Image from 'next/image' with the CSS style { position: absolute; left: 50% }? It appears that it is not being applied. For example: import React from 'react' import Image from 'next/image' imp ...

Why are npm packages often given "exotic" names?

Can someone explain the unique naming convention found in npm packages like "exotic" that appears in the version listing? For example, when I use the command npm outdated, I see: Package Current Wanted Latest URL gulp 4.0.0-alpha.2 ex ...

Error message in Angular 2 RC-4: "Type 'FormGroup' is not compatible with type 'typeof FormGroup'"

I'm currently facing an issue with Angular 2 forms. I have successfully implemented a few forms in my project, but when trying to add this one, I encounter an error from my Angular CLI: Type 'FormGroup' is not assignable to type 'typeo ...

Using Kotlin/Js to import a npm dependency from a custom registry

Currently, I am working on a project utilizing Kotlin/JS and Gradle. When it comes to adding npm dependencies from the default registry, I can easily do so using the implementation npm("query-string", "7.0.0") command. However, the cha ...

Unable to download npm dependencies. Is your internet connection stable?

At my home, I have a meteor project running smoothly on Ubuntu 14.04. However, the same project fails to build at my workplace. I am using a Windows 7 machine behind a corporate proxy that blocks all outgoing http requests. When I try to build the project, ...

Looking to update the state of a nested object with useReducer?

I am currently developing a Next.js application using Typescript and I need to make changes to a nested object state. Here is the structure of the state: const initialState ={ userInfo: string | null, isLoading: boolean, cursorState: boolean, compa ...

Experiencing an issue with react-bootstrap when running npm start

Recently, I encountered some issues while running a react-js app. However, there were no problems during the npm install process. Package Versions: react: "^16.10.2" react-bootstrap: "^1.0.0-beta.16" I attempted the following steps to resolve the issues ...

Discover more in React about using ellipses (...) with dangerouslySetInnerHTML

What is the best method for limiting the number of HTML lines retrieved using dangerouslySetInnerHTML in a React application and creating a '... Read More' expander for it? I attempted to use react-lines-ellipsis, but unfortunately the 'tex ...

Utilize an Angular HttpInterceptor to invoke a Promise

I have an angular HttpInterceptor and I am in need of invoking an encryption method that is defined as follows: private async encrypt(obj: any): Promise<string> { However, I am unsure of how to handle this within the HttpInterceptor: intercept(req ...