ANGULAR2 Error in Startup project: Error in Appmodule isn't an ngmodule

Source: Internet
Author: User

ANGULAR2 Startup Project error, similar to the following error, I hope to be useful to you, error message: Error in Appmodule isn't an ngmodule

This type of problem occurs because a different version causes the startup to fail

The following solutions are described below:

1. View dependent components NPM LS typescript

The information in the diagram shows that this project needs to rely on version 2.2.2, the version 2.3.2 installed on the computer.

2, enter CNPM install typescript [email protected], install a 2.2.2 version. (See another blog, I set the local image to CNPM, this side not much introduction)

3. Open the project and find the "typescript" in the Package.json file instead of "~2.2.2"

3, enter CNPM install re-initialize the installation

4, you can view the next dependent components NPM LS typescript, do not view also line;

5, can now start the service normally, input npm start or NG serve, wait a moment, after the successful launch, the browser input http://localhost:4200/is done.

ANGULAR2 Error in Startup project: 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.