2

I have recently created a project using angular-cli and am unable to run it using ng serve

while running ng serve command it throws this error

Cannot read property 'AssetUrl' of undefined TypeError: Cannot read property 'AssetUrl' of undefined at Object. (/Users/shaan/Sites/node-apps/migration/Outgrow-frontend/node_modules/@angular/compiler-cli/src/private_import_compiler.js:10:51)

2 Answers 2

3

Consider taking following steps:

  1. check your angular-cli.json and package.json for version of angular-cli in your project, it should be same e.g. ("version": "1.0.0-beta.x").

  2. install angular-cli as global package using

    npm install -g angular-cli

this should fix your problem.

Sign up to request clarification or add additional context in comments.

3 Comments

where is angular-cli.json?
@CoryDorning it will be created when you initialize your project by using ng new <poject-name> and ng init
okay gotcha. my issue is that I'm getting the AssetUrl error when trying to initialize a new project. :/
0

I solved issue by updating angular-cli to v1.0.0-beta.18 (which is latest build) and did "ng init" within local project folder.

follow https://github.com/angular/angular-cli#updating-angular-cli

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.