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
Failed to load the Angular CLI config (Angular 11.2.5) #14260
Comments
@shilman It works if I downgrade to @angular-devkit/build-angular@0.1100.0 but the rebuild times will dip again 10x with Angular 11.2.5 see angular/angular-cli#20235. We cant develop like this. |
@gaetanmaisse can you take a look at this? seems to be related to your previous PR |
@shilman @gaetanmaisse it works when I explicitly add following to the angular.json: that means no optimization: false or true, but one must define at least one of the properties shown above. |
@jlabaj Adding these fields has been done in #13704 so you shouldn't face this issue 🤔 , I tried to reproduce but everything is working fine for me with a fresh Angular CLI project and:
Can you share your |
@gaetanmaisse here you go:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"arbitrarycompany-enterprise": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "less,sass"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./webpack-arbitrarycompany.config.js"
},
"allowedCommonJsDependencies": ["rxjs", "rxjs-compat", "inputmask", "quill-emoji", "pixi.js", "jodit"],
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"deleteOutputPath": false,
"outputHashing": "none",
"tsConfig": "tsconfig.app.json",
"namedChunks": false,
"showCircularDependencies": false,
"extractLicenses": false,
"statsJson": false,
"progress": true,
"sourceMap": false,
"buildOptimizer": false,
"aot": true,
"preserveSymlinks": false,
"optimization": {
"styles": false,
"scrypts": false,
"fonts": false
},
"vendorChunk": true,
"commonChunk": true,
"watch": false,
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"src/styles.less",
"node_modules/@ag-grid-community/all-modules/dist/styles/ag-grid.css",
"node_modules/@ag-grid-community/all-modules/dist/styles/ag-theme-balham.css",
"node_modules/@ag-grid-community/all-modules/dist/styles/ag-theme-alpine.css",
"node_modules/@ng-select/ng-select/themes/material.theme.css",
"node_modules/material-icons/iconfont/material-icons.css",
"node_modules/font-awesome/scss/font-awesome.scss",
"node_modules/typeface-nunito/index.css",
"styles.scss",
"arbitrarycompany/arbitrarycompany-app-theme.scss"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/underscore/underscore-min.js",
"libs-manual/modernizr/modernizr.js",
"node_modules/moment/moment.js",
"node_modules/angular/angular.js",
"node_modules/angular-resource/angular-resource.js",
"node_modules/angular-bindonce/bindonce.js",
"node_modules/pixi.js/dist/pixi.js",
"node_modules/signalr/jquery.signalR.js"
]
},
"configurations": {
...many configurations
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "arbitrarycompany-enterprise:build"
},
"configurations": {
"production": {
"browserTarget": "arbitrarycompany-enterprise:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "arbitrarycompany-enterprise:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "arbitrarycompany/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/img"],
"styles": ["src/styles.less"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"eslintConfig": ".eslintrc.json",
"lintFilePatterns": ["src/app/**/*.ts"]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "arbitrarycompany-enterprise:serve"
},
"configurations": {
"production": {
"devServerTarget": "arbitrarycompany-enterprise:serve:production"
}
}
}
}
}
},
"defaultProject": "arbitrarycompany-enterprise"
} |
@gaetanmaisse there is also a custom webpack that is not doing much, but this bit could mess it up:
const webpackConfigBase = {
optimization: {
concatenateModules: false,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: environment.optimizeTerser ? true : false,
keep_fnames: environment.optimizeTerser ? true : false,
},
}),
],
},
...
module: {
rules: [
{
test: require.resolve('jquery-migrate'),
use: 'imports-loader?define=>false',
},
{
test: /\.(js)$/,
exclude: [/libs-manual\\/, /libs-manual\//, /node_modules\//, /node_modules\\/],
use: {
loader: 'babel-loader',
options: {
plugins: ['@babel/plugin-proposal-nullish-coalescing-operator', '@babel/plugin-proposal-optional-chaining'],
presets: [['@babel/preset-env', { modules: false }]],
},
},
},
],
}, |
Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.0-alpha.43 containing PR #15022 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
@shilman , I just tried this and it's still failing. Just to note:
Storybook is installed in the root directory, not in the project directory.
|
I have run the npx sb upgrade --prerelease
I have nuked the node_modules and reinstalled, still the same error
"@angular-builders/custom-webpack": "11.0.0",
"@angular-devkit/architect": "0.1102.4",
"@angular-devkit/build-angular": "0.1102.4",
"@angular-devkit/build-ng-packagr": "0.1100.0-next.5",
"@angular-devkit/build-optimizer": "0.1102.4",
"@angular-devkit/build-webpack": "0.1102.4",
"@angular-devkit/core": "11.2.4",
"@angular-eslint/builder": "0.3.0-beta.1",
"@angular-eslint/eslint-plugin": "1.0.0",
"@angular-eslint/eslint-plugin-template": "1.0.0",
"@angular-eslint/template-parser": "1.0.0",
"@angular/animations": "11.2.5",
"@angular/cdk": "11.2.4",
"@angular/cli": "11.2.4",
"@angular/common": "11.2.5",
"@angular/compiler": "11.2.5",
"@angular/compiler-cli": "11.2.5",
"@angular/core": "11.2.5",
"@angular/forms": "11.2.5",
"@angular/language-service": "11.2.5",
"@angular/material": "11.0.0",
"@angular/platform-browser": "11.2.5",
"@angular/platform-browser-dynamic": "11.2.5",
"@angular/router": "11.2.5",
"@angular/upgrade": "11.2.5",
"@babel/core": "^7.7.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.10.4",
"@babel/plugin-proposal-optional-chaining": "7.11.0",
"@babel/preset-env": "^7.7.7",
"@compodoc/compodoc": "1.1.11",
"@ng-select/ng-option-highlight": "0.0.6",
"@ng-select/ng-select": "5.1.0",
"@ngrx/entity": "10.0.0",
"@ngx-translate/core": "13.0.0",
"@ngx-translate/http-loader": "6.0.0",
"@storybook/addon-actions": "6.2.0-rc.2",
"@storybook/addon-essentials": "6.2.0-rc.2",
"@storybook/addon-links": "6.2.0-rc.2",
"@storybook/angular": "6.2.0-rc.2",
"@types/angular": "1.6.57",
"@types/angular-dynamic-locale": "0.1.35",
"@types/angular-mocks": "1.5.10",
"@types/angular-resource": "1.5.15",
"@types/angular-translate": "2.16.2",
"@types/angular-ui-bootstrap": "0.13.46",
"@types/angular-ui-router": "1.1.40",
"@types/core-js": "0.9.46",
"@types/d3": "5.7.2",
"@types/d3-selection": "1.4.2",
"@types/jasmine": "3.6.6",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "3.3.31",
"@types/jqueryui": "^1.12.10",
"@types/jsrender": "0.0.29",
"@types/lodash": "4.14.105",
"@types/node": "12.12.38",
The text was updated successfully, but these errors were encountered: