Skip to content

ng build --prod issue #6355

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

Closed
YadJosan opened this issue May 17, 2017 · 4 comments
Closed

ng build --prod issue #6355

YadJosan opened this issue May 17, 2017 · 4 comments
Labels
effort1: easy (hours) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity1: confusing

Comments

@YadJosan
Copy link

ERROR in Expected 'styles' to be an array of strings.

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'D:\Projects\simplifyng2\src'
@ ./src/main.ts 5:0-74
@ multi ./src/main.ts

@RicardoVaranda
Copy link
Contributor

Hi @YadJosan ,

Could you please post your angular-cli.json
This error normally occurs when you don't have styles declared in the correct way:

"styles": [
        "styles.scss"
      ],

In older versions of the cli this was declared different, if you are updating your application from an older version you must ensure all changes to the angular-cli.json are compliant with the new standards.

@Brocco Brocco added effort1: easy (hours) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity1: confusing labels May 18, 2017
@Brocco Brocco self-assigned this May 18, 2017
@YadJosan
Copy link
Author

YadJosan commented May 18, 2017

This is my angular-cli.json file

{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "smartadmin"
},
"apps": [{
"root": "src",
"outDir": "dist",
"assets": [
"assets"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": ["styles.css"],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [{
"project": "src/tsconfig.app.json"
}, {
"project": "src/tsconfig.spec.json"
}, {
"project": "e2e/tsconfig.e2e.json"
}],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {
"style": false,
"template": false
}
}
}

@RicardoVaranda
Copy link
Contributor

Issue seems to be fixed according to user #5989 (comment)

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: easy (hours) P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity1: confusing
Projects
None yet
Development

No branches or pull requests

3 participants