ERROR in Appmodule isn't an ngmodule

Source: Internet
Author: User

Learning Angularjs 2.0, in the building development environment in the start of the card for a long time, groping a morning finally found a way, after constant testing finally to solve. It's still a little unclear, but I'm still documenting it.

Error error in Appmodule isn't an ngmodule:

Then I look at the dependent components NPM LS typescript

There is a different version number, one that needs to be relied on 2.2.2 One is the installed version 2.3.2.

Then enter CNPM install typescript [email protected] To install a 2.2.2 version.

Then replace "Typescript" in the Package.json file with the following: "~2.2.2"

Enter CNPM install to reinitialize.

Take a look at the dependency component NPM LS typescript

So the version number is 2.2.2, this can start the service, input ng serve

Successful start, very happy. Enter Http://localhost:4200/to see the effect.

Finally, when installing the environment, remember to use CNPM install. The native NPM install installation will give an error because we are in a magical country.

ERROR in Appmodule isn't an ngmodule

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.