angular-cli

Trying to use ts-nameof in Angular project via ts-patch

徘徊边缘 提交于 2021-02-19 05:24:13
问题 I'm using Angular 8.2 and installed ts-nameof 4.2.2 for my project and ts-patch 1.0.5 globally. I ran ts-patch install and ts-patch check shows: Checking TypeScript v3.5.3 installation in [...] [+] tsc.js is patched with ts-patch version 1.0.5. [+] tsserverlibrary.js is patched with ts-patch version 1.0.5. [+] typescript.js is patched with ts-patch version 1.0.5. [+] typescriptServices.js is patched with ts-patch version 1.0.5. So I added the following from the ts-patch examples section to my

Trying to use ts-nameof in Angular project via ts-patch

。_饼干妹妹 提交于 2021-02-19 05:24:12
问题 I'm using Angular 8.2 and installed ts-nameof 4.2.2 for my project and ts-patch 1.0.5 globally. I ran ts-patch install and ts-patch check shows: Checking TypeScript v3.5.3 installation in [...] [+] tsc.js is patched with ts-patch version 1.0.5. [+] tsserverlibrary.js is patched with ts-patch version 1.0.5. [+] typescript.js is patched with ts-patch version 1.0.5. [+] typescriptServices.js is patched with ts-patch version 1.0.5. So I added the following from the ts-patch examples section to my

Trying to use ts-nameof in Angular project via ts-patch

拜拜、爱过 提交于 2021-02-19 05:24:08
问题 I'm using Angular 8.2 and installed ts-nameof 4.2.2 for my project and ts-patch 1.0.5 globally. I ran ts-patch install and ts-patch check shows: Checking TypeScript v3.5.3 installation in [...] [+] tsc.js is patched with ts-patch version 1.0.5. [+] tsserverlibrary.js is patched with ts-patch version 1.0.5. [+] typescript.js is patched with ts-patch version 1.0.5. [+] typescriptServices.js is patched with ts-patch version 1.0.5. So I added the following from the ts-patch examples section to my

npm install is building .cmd files in my angular project root directory

拈花ヽ惹草 提交于 2021-02-18 12:42:15
问题 I have a project that I've been working with for quite some time and it has built and compiled (and still does on a different machine) for months. Now, when I run the command npm install it runs as normal, but at the end of the process, it builds out tons of .cmd files (and another accompanying file) in the root folder of my project. when I run ng serve i get the error: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") I'm completely stumped as to how to get my

Configuring angular production files after build

放肆的年华 提交于 2021-02-11 13:50:22
问题 I have an angular 9 project which is part of an application suite installer [Wix installer]. One of the settings used by the angular app is the address of API which it fetches its data from some configurable address. I know that I can have many angular environment files and simply use commands such as the followings: environment.env1.ts export const environment = { production: true, apiAddress: "http://apiAddress1/api/", }; ng build --prod --configuration=env1 or environment.env2.ts export

The Angular CLI currently requires npm version 6

好久不见. 提交于 2021-02-11 06:51:07
问题 I am using angular ng new command to create a application. ng new angular-hello-world. got below error. npm version 7.5.1 detected. The Angular CLI currently requires npm version 6. Please install a compatible version to proceed ( npm install --global npm@6 ). any idea what it is ? why need to install npm@6 回答1: try this instead npm install --global npm@6 回答2: Yo can solve this problem using the latest Node.js version compatible with npm 6: Node.js 14.15.4 Use nvm (Mac or Linux) or nvm

Create angular lib inside folder

拜拜、爱过 提交于 2021-02-11 06:11:35
问题 Hi I am currently using angular 8 with cli version 8.3.17. I am trying to create an library inside a libs folder instead of the normal projects folder I tried running: ng g lib libs/test** but I get the error: Project name "libs/test" is not valid. New project names must start with a letter, and must contain only alphanumeric characters or dashes. When adding a dash the segment after the dash must also start with a letter. libs/test 回答1: In your angular.json, you can change "newProjectRoot"

ng serve won't compile

本秂侑毒 提交于 2021-02-11 05:02:37
问题 I'm trying to get my very first angular app compiled, but ng serve spits this error: ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/ang ular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embe dded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss) Module build failed (from ./node_modules/postcss-loader/src/index.js): Error: Failed to find 'angular/material/prebuilt-themes/deeppurple-amber.css' in [ C:\Users\juio

ng serve won't compile

房东的猫 提交于 2021-02-11 04:58:10
问题 I'm trying to get my very first angular app compiled, but ng serve spits this error: ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/ang ular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embe dded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss) Module build failed (from ./node_modules/postcss-loader/src/index.js): Error: Failed to find 'angular/material/prebuilt-themes/deeppurple-amber.css' in [ C:\Users\juio

ng serve won't compile

心不动则不痛 提交于 2021-02-11 04:57:17
问题 I'm trying to get my very first angular app compiled, but ng serve spits this error: ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/ang ular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embe dded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss) Module build failed (from ./node_modules/postcss-loader/src/index.js): Error: Failed to find 'angular/material/prebuilt-themes/deeppurple-amber.css' in [ C:\Users\juio