{"id":2073,"date":"2017-05-11T10:25:30","date_gmt":"2017-05-11T10:25:30","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=2073"},"modified":"2018-10-10T17:15:57","modified_gmt":"2018-10-10T17:15:57","slug":"angular-cli-error-on-ng-build-the-angularcompiler-cli-package-was-not-properly-installed","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=2073","title":{"rendered":"Angular-cli error on ng build: &ldquo;The &quot;@angular\/compiler-cli&quot; package was not properly installed.&rdquo;"},"content":{"rendered":"<p>I got this error when trying to build and run the <a href=\"https:\/\/github.com\/primefaces\/primeng-quickstart-cli\">primeng-quickstart-cli<\/a> per the readme in the git project<\/p>\n<blockquote>\n<p>E:\\Dev\\angular\\primeng-quickstart-cli&gt;ng build     <br \/>You seem to not be depending on &quot;@angular\/core&quot;. This is an error.<\/p>\n<p>E:\\Dev\\angular\\primeng-quickstart-cli&gt;ng serve     <br \/>The &quot;@angular\/compiler-cli&quot; package was not properly installed.      <br \/>Error: The &quot;@angular\/compiler-cli&quot; package was not properly installed.      <br \/>&#160;&#160;&#160; at Object.&lt;anonymous&gt; (E:\\Dev\\angular\\primeng-quickstart-cli\\node_modules\\@ngtools\\webpack\\src\\index.js:14:11)      <br \/>&#160;&#160;&#160; at Module._compile (module.js:571:32)      <br \/>&#160;&#160;&#160; at Object.Module._extensions..js (module.js:580:10)      <br \/>&#160;&#160;&#160; at Module.load (module.js:488:32)      <br \/>&#160;&#160;&#160; at tryModuleLoad (module.js:447:12)      <br \/>&#160;&#160;&#160; at Function.Module._load (module.js:439:3)      <br \/>&#160;&#160;&#160; at Module.require (module.js:498:17)      <br \/>&#160;&#160;&#160; at require (internal\/module.js:20:19)      <br \/>&#160;&#160;&#160; at Object.&lt;anonymous&gt; (E:\\Dev\\angular\\primeng-quickstart-cli\\node_modules\\@angular\\cli\\tasks\\eject.js:10:19)      <br \/>&#160;&#160;&#160; at Module._compile (module.js:571:32)      <br \/>&#160;&#160;&#160; at Object.Module._extensions..js (module.js:580:10)      <br \/>&#160;&#160;&#160; at Module.load (module.js:488:32)      <br \/>&#160;&#160;&#160; at tryModuleLoad (module.js:447:12)      <br \/>&#160;&#160;&#160; at Function.Module._load (module.js:439:3)      <br \/>&#160;&#160;&#160; at Module.require (module.js:498:17)      <br \/>&#160;&#160;&#160; at require (internal\/module.js:20:19)<\/p>\n<p>E:\\Dev\\angular\\primeng-quickstart-cli&gt;<\/p>\n<\/blockquote>\n<p>I tried upgrading angular-cli as per <a href=\"http:\/\/salientsoft.co.uk\/?p=2071\">here<\/a>, but this did not solve the problem.<\/p>\n<p>Interestingly when I tried to start the alternative <a href=\"https:\/\/github.com\/primefaces\/primeng-quickstart-webpack\">primeng-quickstart-webpack<\/a> project using ng-serve, I got the same error as above.<\/p>\n<p>However, when following the correct (and different) instructions for <a href=\"https:\/\/github.com\/primefaces\/primeng-quickstart-webpack\">primeng-quickstart-webpack<\/a>&#160; as follows it worked:-<\/p>\n<blockquote>\n<p>npm install <\/p>\n<p>npm run start:webpack<\/p>\n<\/blockquote>\n<p>I therefore tried to use these npm install\/run commands on the <a href=\"https:\/\/github.com\/primefaces\/primeng-quickstart-cli\">primeng-quickstart-cli<\/a> project but it was clearly not set up for this build\/run mechanism:-<\/p>\n<blockquote>\n<p>E:\\Dev\\angular\\primeng-quickstart-cli&gt;npm run start:webpack     <br \/>npm ERR! Windows_NT 6.1.7601      <br \/>npm ERR! argv &quot;E:\\\\Program Files\\\\nodejs\\\\node.exe&quot; &quot;E:\\\\Program Files\\\\nodejs\\\\node_modules\\\\n      <br \/>npm ERR! node v7.10.0      <br \/>npm ERR! npm&#160; v4.2.0<\/p>\n<p>npm ERR! missing script: start:webpack     <br \/>npm ERR!      <br \/>npm ERR! If you need help, you may report this error at:      <br \/>npm ERR!&#160;&#160;&#160;&#160; &lt;<a href=\"https:\/\/github.com\/npm\/npm\/issues\">https:\/\/github.com\/npm\/npm\/issues<\/a>&gt;<\/p>\n<p>npm ERR! Please include the following file with any support request:     <br \/>npm ERR!&#160;&#160;&#160;&#160; C:\\Users\\SteveW\\AppData\\Roaming\\npm-cache\\_logs\\2017-05-11T10_08_50_957Z-debug.log<\/p>\n<\/blockquote>\n<p>At present the issue with <a href=\"https:\/\/github.com\/primefaces\/primeng-quickstart-cli\">primeng-quickstart-cli<\/a> is not a blocking one \u2013 the other starter&#160; <a href=\"https:\/\/github.com\/primefaces\/primeng-quickstart-webpack\">primeng-quickstart-webpack<\/a> looks preferable as it is a simple full CRUD table app whereas the other starter it a trivial one whch just outputs a message in response to a button click.<\/p>\n<p>These StackOverflow posts <a href=\"http:\/\/stackoverflow.com\/questions\/41534459\/you-seem-to-not-be-dependending-on-angular-core-this-is-an-error\">here<\/a> and <a href=\"http:\/\/stackoverflow.com\/questions\/41421474\/why-am-i-receiving-the-following-error-message-when-running-the-ng-serve-command\">here<\/a> discuss the error, but I did not appear to be missing the basic config. <a href=\"http:\/\/stackoverflow.com\/questions\/39780833\/error-cannot-find-module-angular-core\">This post<\/a> might be more relevant, and advises downgrading first then re-upgrading, but it refers to angular 2 rather than 4.<\/p>\n<p>I hope to learn and resolve these build issues and errors at some point soon though and gain a better understanding of what is going on\/ what are the alternatives.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got this error when trying to build and run the primeng-quickstart-cli per the readme in the git project E:\\Dev\\angular\\primeng-quickstart-cli&gt;ng build You seem to not be depending on &quot;@angular\/core&quot;. This is an error. E:\\Dev\\angular\\primeng-quickstart-cli&gt;ng serve The &quot;@angular\/compiler-cli&quot; package was not properly installed. Error: The &quot;@angular\/compiler-cli&quot; package was not properly installed. &#160;&#160;&#160; at Object.&lt;anonymous&gt; (E:\\Dev\\angular\\primeng-quickstart-cli\\node_modules\\@ngtools\\webpack\\src\\index.js:14:11) &#160;&#160;&#160; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[198,209],"tags":[13,40],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2073"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2073"}],"version-history":[{"count":2,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2073\/revisions"}],"predecessor-version":[{"id":2075,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2073\/revisions\/2075"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}