我想使用角CLI命令启动一个angular4项目。我试过使用命令:
ng new angular-sample --ng4
但这说明了
选项运行ng new --help以获得支持的选项列表。
上面的命令创建了angular2项目文件夹结构。
有没有办法在不手动编辑angular4中的角2版本(> 4)的情况下启动package.json?
我用的是角6+。今天,我将cli升级到7.1,并尝试创建一个新的应用程序。我运行下面的命令来创建一个新项目
ng new my-first-project
我得到以下错误。
Schematic input does not validate against the Schema: {"name":"my-first-project"}
Errors:
Data path "" should have required property 'version'.
然后我像这样运行命令。
ng new my-first-pr
当我尝试运行Angular 7.2和Firebase的全新安装时,我似乎得到了这个错误:
ERROR in node_modules/@angular/fire/firebase.app.module.d.ts(17,22): error TS2420: Class 'FirebaseApp' incorrectly implements interface 'App'.
Property 'performance' is missing in type 'FirebaseApp' but required in type &
最近我试着学习angular,但是我陷入了angular的错误。所以就是这样了。我使用的是Ubuntu 18.04,通过nvm安装了最新版本的节点。但是我在Ubuntu中有“两个”节点,默认的nodejs现在是v8,还有节点v13。当我尝试用ng new my-first-project创建angular项目时,它运行得很好,但它总是警告一些不推荐使用的依赖项,例如core-js。我将core-js升级到了最新版本(强制使用sudo)。但是弃用警告并没有消失,我本想使用sudo ng new my-first-project,但这次它给我带来了错误 You are running versi
我刚刚更新了angular-cli
如果我用ng -v检查终端,得到的结果如下:
Angular CLI: 1.6.1
Node: 8.6.0
OS: darwin x64
Angular:
...
当我尝试使用以下命令搭建一个新的angular应用程序时
ng new my-app
我得到以下错误消息:
Error: obs.pipe is not a function
obs.pipe is not a function
我已经多次尝试安装和卸载cli,但仍然无法解决这个问题。
所以我买了一台新的pc,我想通过github来传递我的angular项目。我用的是1.npm i 2.npm i @angular/cli@latest -D 3. ng update
每次我尝试用ng s运行这个项目时,它总是给我这个错误:
This version of CLI is only compatible with Angular versions ^9.0.0-beta || >=9.0.0 <10.0.0,
but Angular version 8.2.14 was found instead.
Please visit the link below to f
我用的是角CLI。我创建它的时候:
ng new MyFirstApp
然后,我尝试使用以下方法运行端到端的测试:
ng e2e
我收到以下错误消息:
E/launcher - session not created: This version of ChromeDriver only supports Chrome version 79
Driver info: chromedriver=79.0.3945.16
at Object.checkLegacyResponse (C:\TestProj\Angular\MyFirstApp\node_modules\selenium-webdr
我在运行ng build命令时遇到以下错误。删除node_modules文件夹和npm分期付款,发出以下警告
npm WARN angular2-cool-storage@3.1.2 requires a peer of @angular/core@5.0.0 but none was installed.
npm WARN angular2-cool-storage@3.1.2 requires a peer of @angular/common@^5.0.0 but none was installed.
对于在id deetail错误下面构建ng:
模块/node_modules/an
我正在尝试使用ng new my-app和yarn 2DLX命令开始新的Angular项目。即获取最新的Angular CLI并创建新项目。我尝试了一下,但是失败了: λ yarn dlx --package @angular/cli ng new my-app
yarn run v1.22.4
error Couldn't find a package.json file in "C:\\Users\\sax\\Documents\\devel"
info Visit https://yarnpkg.com/en/docs/cli/run for documenta
我正在尝试将一个项目从Angular 7升级到8。在运行ng update @angular/cli @angular/core时,我得到了以下错误:
Package "@swimlane/ngx-charts" has an incompatible peer dependency to "zone.js" (requires "^0.8.26", would install "0.9.1").
有没有办法从我的ng更新中排除zone.js?它已经在0.8.26上了。
当使用ng g c my-component生成一个新组件时,我会得到以下错误:
找不到NgModule。使用skip选项在NgModule中跳过导入。
如果我然后使用跳过导入选项角将在我的e2e文件夹中生成组件。
我假设这与我的angular.json文件有关,该文件在我运行ng升级之前曾被称为angular-cli.json,这无疑是造成问题的原因,因为似乎出现了一些结构性变化。
有没有办法解决这个问题,而不使用CLI创建一个新项目,然后手动复制文件..?
ng g c从根“my”文件夹中运行。
文件夹结构:
my-app
- dist
- e2e
- node_module
我已经在一台新的机器上安装了最新的angular-cli,并且我正在尝试使用以前的cli版本生成的项目
我收到了这个警告
Your global Angular CLI version (1.6.4) is greater than your local
version (1.6.3). The local Angular CLI version is used.
To disable this warning use "ng set --global warnings.versionMismatch=false".
虽然项目工作正常,但为了用最新的依赖项更新项目并避免此消息
我试着用角-cli创建一个新的角度应用程序。我面临的问题,在npm包安装。
当我尝试使用角-cli创建一个新的角应用程序并开始安装npm包时,我将面临以下错误。
获取以下错误:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @babel/helper-split-export-declaration@^7.4.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarge
我所要做的就是将我的angular项目从版本4升级到版本6。在尝试升级到版本6失败并出现错误后,我更新了angualr cli(by npm uninstall -g angular-cli and after installing again)。在安装了新的角度cli之后,我现在得到了这个错误。
Error: Cannot find module 'C:\Users\Enoch\Workspaces\Angular IDE 2017 CI\new-front\node_modules\@angular\cli\ember-cli\lib\cli\cli'
at Functio
因此,我再次在path中添加了这个库,但是当我输入ng new Colorizer时,我收到了一个窗口弹出,询问我如何打开这个文件。我只需要做一个新的项目,已经尝试了好几个小时了。在谷歌上搜索几乎毫无用处。
无论如何,当我用Visual代码打开它时,它会打开一个包含以下内容的文件:
#!/usr/bin/env node
'use strict';
// Provide a title to the process in `ps`.
// Due to an obscure Mac bug, do not start this title with any symbo