我的Angular项目有一个问题。特别是在项目的构建上。
当我使用构建我的Angular poject时
ng build
它会创建具有正确构建的dist-folder。当我使用以下命令时:
ng build --prod
它创建产品构建(正确)
当我使用NPM (由build server使用)时,我使用以下代码:
run build
但我想要的是产品版本。无论我做什么,它都不能在本地或构建服务器上工作。我使用了这些:
npm run build --prod
npm run build --target=production
npm run build --environment=prod
我已经检查了链接,但是它对我无效,生成新组件时得到了相同的错误Option "styleExt" is not defined。
我也尝试使用ng set defaults.styleExt scss命令,但是它给出了类似于get/set have been deprecated in favor of the config command.的响应
因此,我无法在我的项目中生成新组件。
这是我的angular.json文件。
angular.json文件
{
"$schema": "./node_modules/@angular/cli/lib
我有一个Angular应用程序,我正试图通过Jenkins部署它。标准的DEV构建运行良好,但当我执行ng build --prod时,它显示"ng: command not fine“。
当使用npm run ng build -- --prod运行命令时,它会显示"line 1: 6910 Killed“,后跟失败的命令
上周,我可以让prod build成功完成,但没有拿起environment.prod.ts文件。今天,我得到了上面两个错误中的一个。
我尝试了以下构建命令:
sh "ng build --prod"
sh "npm run ng
下面是我的launch.js
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
我用angular 9创建了一个webaite,但是我用angular有一个问题。
在某些路径中,我有这样的错误:
ERROR Error: Uncaught (in promise): Error: Angular JIT compilation failed: '@angular/compiler' not loaded!
- JIT compilation is discouraged for production use-cases! Consider AOT mode instead.
- Did you bootstrap using '@angul
我有一个正在运行的应用程序,当我使用npm run start时,它是完全正常的。但是当我使用npm run build:ssr和npm run serve:ssr时,它不能正常工作。奇怪的是,它没有给出任何错误。 当我做npm run start的时候,我看到一个按钮,它当前的不透明度是65%。当我悬停鼠标时,我希望不透明度为100%。 ? ? 当我做Angular SSR构建(npm run build:ssr和npm run serve:ssr)时,它不能正确显示不透明度。 ? ? 目前,我使用CDN在应用程序中加载Bootstrap,将链接嵌入到index.html中,如
我不能在开发模式下运行ng serve。
我已将角v11升级为v12。从那以后,我有编译延迟和开发模式似乎没有启用。
我总是收到这样的警告:
****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.
DON&
这是我第一次在在线服务器上部署一个有角度的应用程序。它不是一个企业的东西。在部署期间,我使用了以下命令
ng build --baseHref=https://www.exampleUrl.com/ --deployUrl=https://www.exampleUrl.com/
然后我把它上传到CPanel。
在的头几分钟,我可以看到我的网页上有绝对的url "www.exampleUrl.com“,但是移动设备无法访问这个应用程序(idk来查看移动设备中的控制台登录,所以我无法提供日志问题)。在一个小时后返回这个错误
Access to XMLHttpRequest at '