@angular/cli: 1.0.0-rc.4
node: 6.9.1
os: win32 x64
@angular/animations: 4.0.0-rc.5
@angular/common: 4.0.0-rc.5
@angular/compiler: 4.0.0-rc.5
@angular/core: 4.0.0-rc.5
@angular/forms: 4.0.0-rc.5
@angular/http: 4.0.0-rc.5
@angular/platform-browser: 4.0.0-rc.5
@angular/platform-browser-dynamic: 4.0.0-rc.5
@angular/router: 4.0.0-rc.5
@angular/cli: 1.0.0-rc.4
@angular/compiler-cli: 4.0.0-rc.5
Running Angular RC5 and CLI RC2 a ng build works. Updating to CLI RC 4 with yarn it fails with
ERROR in AppModule is not an NgModule if TypeScript is set to 2.2.1. If installed with NPM everything works as normal.
ERROR in AppModule is not an NgModule
Location of bug: I had typescript pinned to version 2.2.1 (latest) but for some reason after upgrading to CLI RC4 that fails when using Yarn. Moving the version back down to 2.1.x solves this bug. This happens on Mac and Windows. Create a new CLI project and pin typescript to 2.2.1 to get the error.
If you delete node_modules and use "npm i" instead yarn everything works fine.
same error here, even after cleaning node_modules and yarn.lock, downgrading TS to 2.1.x is a good workaround for now
@antonybudianto
after cleaning node_modules , have you installed the modules using "npm install" ?
I think this is fixed by https://github.com/angular/angular-cli/pull/5586.
@jmesa-sistel I used yarn for installation
I just updated to typescript ~2.3.0 to fix this
I still can confirm this issue with yarn, while npm works. Comparing the license-checker output of npm (-) with yarn (+), I get the followings result:
-鈹溾攢 [email protected]
+鈹溾攢 [email protected]
+鈹溾攢 [email protected]
+鈹溾攢 [email protected]
+鈹溾攢 [email protected]
-鈹溾攢 [email protected]
-鈹溾攢 [email protected]
+鈹溾攢 [email protected]
-鈹溾攢 [email protected]
+鈹溾攢 [email protected]
-鈹溾攢 [email protected]
-鈹溾攢 [email protected]
-鈹溾攢 [email protected]
+鈹溾攢 [email protected]
But none of them is an obvious candidate for the root cause of this issue.
"@angular/core": "^4.1.3",
"@angular/cli": "^1.0.4",
"@angular/compiler-cli": "^4.1.3",
"typescript": "^2.3.3"
Neither npm or yarn is working for me. The errors still here :

My project package.json:
{
"name": "nsm-test",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"core-js": "^2.4.1",
"ngx-smart-modal": "^1.0.2",
"rxjs": "^5.1.0",
"web-animations-js": "^2.2.5",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.1.3",
"@angular/compiler-cli": "^4.0.0",
"@angular/language-service": "^4.0.0",
"@types/jasmine": "2.5.45",
"@types/node": "~6.0.60",
"codelyzer": "~3.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.0.4",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
}
}
Is this issue coming from the project itself or from the package (ngx-smart-modal)?
Any resolution on this? I am also getting the same error, suddenly
The error is not solved, I'm still getting the error with ngtools/webpack 1.7.2, typescript: 2.2.2, and yarn 1.0.1
I solved the issue by updating Typescript version to "~2.3.0"
This issue still happens with ~2.3.0 typescript.
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._