-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined:14:952802: missing '}' #21726
Comments
Same root cause of #20760 |
in the mentioned solution, you comment on disabling inlineCritical, but it is disabled and the error after the build continues. {
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"vimbo": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json",
"assets": [
"src/robots.txt",
"src/favicon.ico",
"src/assets",
"src/manifest.webmanifest",
"src/manifest.webmanifest",
{
"glob": "**/*",
"input": "node_modules/ngx-monaco-editor/assets/monaco",
"output": "./assets/monaco/"
}
],
"styles": ["src/styles.scss", "./node_modules/froala-editor/css/froala_editor.pkgd.min.css"],
"scripts": ["src/assets/js/block-inspect-element-vimbo.js", "src/assets/js/listening-postmesage.js"]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all",
"budgets": [
{
"type": "bundle",
"name": "polyfills",
"baseline": "150kb",
"maximumWarning": "50kb",
"maximumError": "100kb"
},
{
"type": "bundle",
"name": "styles",
"baseline": "1.4mb",
"maximumWarning": "600kb",
"maximumError": "900kb"
},
{
"type": "bundle",
"name": "main",
"baseline": "2.5mb",
"maximumWarning": "3mb",
"maximumError": "4mb"
},
{
"type": "initial",
"maximumWarning": "5mb",
"maximumError": "6.5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "15kb",
"maximumError": "35kb"
}
],
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
}
},
"ec": {
"sourceMap": true,
"extractCss": true
},
"hmr": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
}
]
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "vimbo:build:production"
},
"hmr": {
"hmr": true,
"browserTarget": "vimbo:build:hmr"
},
"ec": {
"browserTarget": "vimbo:build:ec"
},
"development": {
"browserTarget": "vimbo:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "vimbo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets", "src/manifest.webmanifest"],
"styles": ["src/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
"exclude": ["**/node_modules/**", "**/src/app/fake-db/**/*", "**/src/assets/angular-material-examples/**/*", "**/@schematics/**"]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "vimbo:serve"
},
"configurations": {
"production": {
"devServerTarget": "vimbo:serve:production"
}
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/server",
"main": "server.ts",
"tsConfig": "tsconfig.server.json",
"inlineStyleLanguage": "scss"
},
"configurations": {
"production": {
"outputHashing": "media",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"development": {
"optimization": false,
"sourceMap": true,
"extractLicenses": false
}
},
"defaultConfiguration": "production"
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"configurations": {
"development": {
"browserTarget": "vimbo:build:development",
"serverTarget": "vimbo:server:development"
},
"production": {
"browserTarget": "vimbo:build:production",
"serverTarget": "vimbo:server:production"
}
},
"defaultConfiguration": "development"
},
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"routes": ["/"]
},
"configurations": {
"production": {
"browserTarget": "vimbo:build:production",
"serverTarget": "vimbo:server:production"
},
"development": {
"browserTarget": "vimbo:build:development",
"serverTarget": "vimbo:server:development"
}
},
"defaultConfiguration": "production"
}
}
}
},
"defaultProject": "vimbo",
"cli": {
"analytics": false
}
}
|
In your case you also need to disable inline critical css from the Universal express engine. ngExpressEngine({
bootstrap: AppServerModule,
inlineCriticalCss: false,
}), |
I have the same type of message, I've reverted back to v11 for now as I've tried everything that everyone has said and still get the same type of message. Its not a priority for me to upgrade to v12 just yet, but I do wish the message had more information. I also do not have ngExpressEngine in my project. |
@alan-agius4 |
That should work as per https://github.com/angular/universal/blob/7375d00da8d9e06de78c2cf1f6deb1310c37970d/integration/express-engine-ivy/server.ts#L24 Let’s continue the discussion over angular/universal#2294. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Description
By changing my settings to this in my angular.json.
I start getting the following error:
looking deeper, the cause of the problem is css optimization, it removes
all
, exampletransform to
media without all is invalid, returning error
There is a workaround.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: