Skip to content

ng serve is not working with beta .24 #3763

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
nmongiya opened this issue Dec 28, 2016 · 4 comments
Closed

ng serve is not working with beta .24 #3763

nmongiya opened this issue Dec 28, 2016 · 4 comments

Comments

@nmongiya
Copy link

Please provide us with the following information:

OS?

Windows 10.

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.24
node: 6.6.0
os: win32 x64
@angular/common: 2.4.1
@angular/compiler: 2.4.1
@angular/core: 2.4.1
@angular/forms: 2.4.1
@angular/http: 2.4.1
@angular/platform-browser: 2.4.1
@angular/platform-browser-dynamic: 2.4.1
@angular/router: 3.4.1
@angular/compiler-cli: 2.4.1

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
ng serve is not working

The log given by the failure.

Normally this include a stack trace and some more information.
TypeError: Cannot read property '0' of null
at new ArraySchemaTreeNode (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:287:122)
at ObjectSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:194:24)
at new ObjectSchemaTreeNode (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:218:45)
at ArraySchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:194:24)
at new ArraySchemaTreeNode (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:287:39)
at RootSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:194:24)
at RootSchemaTreeNode.ObjectSchemaTreeNode [as constructor] (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:218:45)
at new RootSchemaTreeNode (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-tree.js:322:16)
at GeneratedSchemaClass.SchemaClassBase (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-class-factory.js:65:29)
at new GeneratedSchemaClass (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\json-schema\schema-class-factory.js:164:20)
at new CliConfig (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\config\config.js:24:24)
at Function.CliConfig.fromConfigPath (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\config\config.js:97:16)
at Function.CliConfig.fromProject (D:\Projects\angMat\my-project2\node_modules\angular-cli\models\config.js:45:44)
at Class.config (D:\Projects\angMat\my-project2\node_modules\angular-cli\addon\index.js:11:77)
at D:\Projects\angMat\my-project2\node_modules\angular-cli\ember-cli\lib\models\project.js:182:27
at Array.reduce (native)
at Project.getAddonsConfig (D:\Projects\angMat\my-project2\node_modules\angular-cli\ember-cli\lib\models\project.js:180:22)
at Project.config (D:\Projects\angMat\my-project2\node_modules\angular-cli\ember-cli\lib\models\project.js:162:17)
at D:\Projects\angMat\my-project2\node_modules\angular-cli\commands\serve.js:101:40
at process._tickCallback (internal/process/next_tick.js:103:7)

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

@ghost
Copy link

ghost commented Dec 29, 2016

I would generate a new project and then do a diff compare of the files between the 2. ng serve works for me.

@Destreyf
Copy link

@nmongiya make sure that your global and local angular-cli versions are the same or use the npm commands with a locally installed version (you can setup a script to do builds in the local scope).

Make sure you're project is upto date with angular@2.4.1, rxjs@5.0.1 zone zone.js@0.7.4 a simple way to ensure your required packages are up to date without reinstalling everything is to remove the following directories: node_modules/zone.js, node_modules/rxjs, node_modules/@angular-cli, node_modules/angular-cli, node_modules/@ngtools. then re-issue npm install and it should install everything that's needed. If you need to make sure your cli is globally updated, npm remove -g angular-cli then npm install angular-cli@1.0.0-beta.24 will do the trick.

@filipesilva
Copy link
Contributor

I think I know what this was. Seems related to #3566, and the solution is likely the same: copy over angular-cli.json from a newly generated project.

I think something broke with the defaults. Will track resolution in that other issue though.

@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants