{"id":6629,"date":"2018-05-01T02:44:25","date_gmt":"2018-04-30T18:44:25","guid":{"rendered":"https:\/\/sdeno.com\/?p=6629"},"modified":"2018-05-06T22:37:00","modified_gmt":"2018-05-06T14:37:00","slug":"angular%e8%84%9a%e6%89%8b%e6%9e%b6angular-cli-1-5-0","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=6629","title":{"rendered":"angular\u811a\u624b\u67b6Angular-cli 1.5.0"},"content":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\u73af\u5883\u5b89\u88c5&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>\u73af\u5883\uff1a<\/p>\n<pre>node 8.9.1\r\nAngular-cli 1.5.0<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5b89\u88c5\uff1a<\/p>\n<pre>npm install --global @angular\/cli@1.5.0\r\nnpm i -g @angular-devkit\/core<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5982\u679c\u62a5\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n<pre>Error: Cannot find module '@angular-devkit\/core'<\/pre>\n<p>\u5c31\u662f@angular-devkit\/core\u6ca1\u5b89\u88c5\u597d\uff0c\u5c1d\u8bd5\u7740\u5728~.\/\u76ee\u5f55\u4e2d\u5168\u5c40\u5b89\u88c5<\/p>\n<pre>npm i -g @angular-devkit\/core<\/pre>\n<p>\u6210\u529f\u540e\u5728\u6267\u884c:<\/p>\n<pre>ng  \/\/\u6709\u547d\u4ee4\u8f93\u51fa\u8bf4\u660e\u5b89\u88c5\u6210\u529f<\/pre>\n<p>\u5c1d\u8bd5\u521b\u5efa\u9879\u76ee\u76ee\u5f55<\/p>\n<pre>ng new todo   \/\/todo\u9879\u76ee \u76ee\u5f55\u540d\u79f0<\/pre>\n<p>\u5207\u6362\u5230todo\u76ee\u5f55\uff0c\u6267\u884c npm install\uff0c\u6210\u529f\u540e\u5728\u6267\u884c\uff1a<\/p>\n<pre>ng server --port 3000 --open<\/pre>\n<p>\u5982\u679c\u62a5Error: Cannot find module &#8216;@angular-devkit\/core&#8217;<\/p>\n<p>\u5c31\u5728todo\u5f53\u524d\u76ee\u5f55\u4e0b\u5b89\u88c5\uff1a<\/p>\n<pre>npm i @angular-devkit\/core<\/pre>\n<p>\u518d\u6b21\u6267\u884c\uff1a<\/p>\n<pre>ng server --port 3000 --open<\/pre>\n<p>&nbsp;<\/p>\n<p>\u5982\u679c\u6ca1\u62a5\u9519\uff0c\u57fa\u672c\u5c31\u4f1a\u6d4f\u89c8\u9875\u9762\u4e86\uff1a<\/p>\n<pre>http:\/\/localhost:3000\/<\/pre>\n<figure class=\"mdx-lazyload-container\" style=\"max-width:403px\"><div style=\"padding-top:93.300248138958%\"><\/div><div class=\"mdx-img-loading-sp mdui-valign\"><div><div class=\"mdui-spinner\"><\/div><\/div><\/div><img width=\"403\" height=\"376\" class=\"alignnone size-full wp-image-6631 lazyload\" title=\"angular\u811a\u624b\u67b6Angular-cli 1.5.0\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ngcli.jpg\" alt=\"https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ngcli.jpg\" data-srcset=\"https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ngcli.jpg 403w, https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ngcli-300x280.jpg 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\"><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\u6570\u636e\u4ea4\u4e92&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<figure class=\"mdx-lazyload-container\" style=\"max-width:1954px\"><div style=\"padding-top:88.63868986694%\"><\/div><div class=\"mdx-img-loading-sp mdui-valign\"><div><div class=\"mdui-spinner\"><\/div><\/div><\/div><img width=\"1954\" height=\"1732\" class=\"alignnone size-full wp-image-6639 lazyload\" title=\"angular\u811a\u624b\u67b6Angular-cli 1.5.0\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ok.png\" alt=\"https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ok.png\" data-srcset=\"https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ok.png 1954w, https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ok-300x266.png 300w, https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ok-768x681.png 768w, https:\/\/sdeno.com\/wp-content\/uploads\/2018\/05\/ok-1024x908.png 1024w\" sizes=\"auto, (max-width: 1954px) 100vw, 1954px\"><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\u73af\u5883\u5b89\u88c5&#038; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-6629","post","type-post","status-publish","format-standard","hentry","category-angularjs"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/6629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6629"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/6629\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}