Cannot find module '@angular/compiler'
I run the command npm install -g @angular/cli and after i tried to run my app it says, Cannot find module '@angular/compiler' in the terminal. How can i install the compiler in my package.json in order to compile my application
//package
{
"name": "Restaurant",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint "src/**/*.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "~2.4.9",
"@angular/compiler": "~2.4.9",
"@angular/core": "~2.4.9",
"@angular/forms": "~2.4.9",
"@angular/http": "~2.4.9",
"@angular/platform-browser": "~2.4.9",
"@angular/platform-browser-dynamic": "~2.4.9",
"@angular/router": "~3.4.9",
"@types/lodash": "^4.14.50",
"angular-2-data-table": "^0.1.2",
"angular2-datatable": "^0.5.2",
"core-js": "^2.4.1",
"lodash": "^4.17.4",
"ng2-date-picker": "^0.2.1",
"ng2-file-upload": "^1.1.2",
"ng2-modal": "0.0.25",
"ng2-pagination": "^2.0.1",
"ng2-table": "^1.3.2",
"primeng": "^2.0.1",
"rxjs": "5.2.0",
"tinymce": "^4.5.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.7"
},
"devDependencies": {
"@angular/cli": "^1.0.0-rc.1",
"@types/jasmine": "2.2.30",
"@types/node": "^7.0.5",
"angular/cli": "1.0.0-beta.28.3",
"codelyzer": "3.0.0-beta.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.6.0",
"protractor": "5.1.1",
"ts-node": "2.1.0",
"tslint": "4.5.1",
"typescript": "~2.2.1"
}
}
angular
add a comment |
I run the command npm install -g @angular/cli and after i tried to run my app it says, Cannot find module '@angular/compiler' in the terminal. How can i install the compiler in my package.json in order to compile my application
//package
{
"name": "Restaurant",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint "src/**/*.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "~2.4.9",
"@angular/compiler": "~2.4.9",
"@angular/core": "~2.4.9",
"@angular/forms": "~2.4.9",
"@angular/http": "~2.4.9",
"@angular/platform-browser": "~2.4.9",
"@angular/platform-browser-dynamic": "~2.4.9",
"@angular/router": "~3.4.9",
"@types/lodash": "^4.14.50",
"angular-2-data-table": "^0.1.2",
"angular2-datatable": "^0.5.2",
"core-js": "^2.4.1",
"lodash": "^4.17.4",
"ng2-date-picker": "^0.2.1",
"ng2-file-upload": "^1.1.2",
"ng2-modal": "0.0.25",
"ng2-pagination": "^2.0.1",
"ng2-table": "^1.3.2",
"primeng": "^2.0.1",
"rxjs": "5.2.0",
"tinymce": "^4.5.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.7"
},
"devDependencies": {
"@angular/cli": "^1.0.0-rc.1",
"@types/jasmine": "2.2.30",
"@types/node": "^7.0.5",
"angular/cli": "1.0.0-beta.28.3",
"codelyzer": "3.0.0-beta.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.6.0",
"protractor": "5.1.1",
"ts-node": "2.1.0",
"tslint": "4.5.1",
"typescript": "~2.2.1"
}
}
angular
add a comment |
I run the command npm install -g @angular/cli and after i tried to run my app it says, Cannot find module '@angular/compiler' in the terminal. How can i install the compiler in my package.json in order to compile my application
//package
{
"name": "Restaurant",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint "src/**/*.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "~2.4.9",
"@angular/compiler": "~2.4.9",
"@angular/core": "~2.4.9",
"@angular/forms": "~2.4.9",
"@angular/http": "~2.4.9",
"@angular/platform-browser": "~2.4.9",
"@angular/platform-browser-dynamic": "~2.4.9",
"@angular/router": "~3.4.9",
"@types/lodash": "^4.14.50",
"angular-2-data-table": "^0.1.2",
"angular2-datatable": "^0.5.2",
"core-js": "^2.4.1",
"lodash": "^4.17.4",
"ng2-date-picker": "^0.2.1",
"ng2-file-upload": "^1.1.2",
"ng2-modal": "0.0.25",
"ng2-pagination": "^2.0.1",
"ng2-table": "^1.3.2",
"primeng": "^2.0.1",
"rxjs": "5.2.0",
"tinymce": "^4.5.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.7"
},
"devDependencies": {
"@angular/cli": "^1.0.0-rc.1",
"@types/jasmine": "2.2.30",
"@types/node": "^7.0.5",
"angular/cli": "1.0.0-beta.28.3",
"codelyzer": "3.0.0-beta.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.6.0",
"protractor": "5.1.1",
"ts-node": "2.1.0",
"tslint": "4.5.1",
"typescript": "~2.2.1"
}
}
angular
I run the command npm install -g @angular/cli and after i tried to run my app it says, Cannot find module '@angular/compiler' in the terminal. How can i install the compiler in my package.json in order to compile my application
//package
{
"name": "Restaurant",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"lint": "tslint "src/**/*.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "~2.4.9",
"@angular/compiler": "~2.4.9",
"@angular/core": "~2.4.9",
"@angular/forms": "~2.4.9",
"@angular/http": "~2.4.9",
"@angular/platform-browser": "~2.4.9",
"@angular/platform-browser-dynamic": "~2.4.9",
"@angular/router": "~3.4.9",
"@types/lodash": "^4.14.50",
"angular-2-data-table": "^0.1.2",
"angular2-datatable": "^0.5.2",
"core-js": "^2.4.1",
"lodash": "^4.17.4",
"ng2-date-picker": "^0.2.1",
"ng2-file-upload": "^1.1.2",
"ng2-modal": "0.0.25",
"ng2-pagination": "^2.0.1",
"ng2-table": "^1.3.2",
"primeng": "^2.0.1",
"rxjs": "5.2.0",
"tinymce": "^4.5.2",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.7"
},
"devDependencies": {
"@angular/cli": "^1.0.0-rc.1",
"@types/jasmine": "2.2.30",
"@types/node": "^7.0.5",
"angular/cli": "1.0.0-beta.28.3",
"codelyzer": "3.0.0-beta.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.6.0",
"protractor": "5.1.1",
"ts-node": "2.1.0",
"tslint": "4.5.1",
"typescript": "~2.2.1"
}
}
angular
angular
edited Nov 27 '18 at 14:41
Francesco Borzi
14.4k95185
14.4k95185
asked Mar 3 '17 at 18:06
Liska LiskorLiska Liskor
4813917
4813917
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
Try to delete that "angular/cli": "1.0.0-beta.28.3",
in the devDependencies
it is useless , and add instead of it "@angular/compiler-cli": "^2.3.1",
(since it is the current version, else add it by npm i --save-dev @angular/compiler-cli
), then in your root app folder run those commands:
rm -r node_modules
(or delete yournode_modules
folder manually)
npm cache clean
(doesnt not work in npm v5)npm install
add a comment |
I just run npm install
and then ok.
add a comment |
npm install --save-dev @angular/cli@latest this command is working fine for me ubuntu 16.04 lts
add a comment |
Just to add to this. You will get this error too, when you are running ng serve
not from within your project folder. So always make sure your bash runs from your project folder.
add a comment |
Try this
- npm uninstall angular-cli
- npm install @angular/cli --save-dev
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f42585663%2fcannot-find-module-angular-compiler%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
Try to delete that "angular/cli": "1.0.0-beta.28.3",
in the devDependencies
it is useless , and add instead of it "@angular/compiler-cli": "^2.3.1",
(since it is the current version, else add it by npm i --save-dev @angular/compiler-cli
), then in your root app folder run those commands:
rm -r node_modules
(or delete yournode_modules
folder manually)
npm cache clean
(doesnt not work in npm v5)npm install
add a comment |
Try to delete that "angular/cli": "1.0.0-beta.28.3",
in the devDependencies
it is useless , and add instead of it "@angular/compiler-cli": "^2.3.1",
(since it is the current version, else add it by npm i --save-dev @angular/compiler-cli
), then in your root app folder run those commands:
rm -r node_modules
(or delete yournode_modules
folder manually)
npm cache clean
(doesnt not work in npm v5)npm install
add a comment |
Try to delete that "angular/cli": "1.0.0-beta.28.3",
in the devDependencies
it is useless , and add instead of it "@angular/compiler-cli": "^2.3.1",
(since it is the current version, else add it by npm i --save-dev @angular/compiler-cli
), then in your root app folder run those commands:
rm -r node_modules
(or delete yournode_modules
folder manually)
npm cache clean
(doesnt not work in npm v5)npm install
Try to delete that "angular/cli": "1.0.0-beta.28.3",
in the devDependencies
it is useless , and add instead of it "@angular/compiler-cli": "^2.3.1",
(since it is the current version, else add it by npm i --save-dev @angular/compiler-cli
), then in your root app folder run those commands:
rm -r node_modules
(or delete yournode_modules
folder manually)
npm cache clean
(doesnt not work in npm v5)npm install
edited Nov 14 '18 at 21:47
answered Mar 3 '17 at 18:52
selem mnselem mn
5,10541939
5,10541939
add a comment |
add a comment |
I just run npm install
and then ok.
add a comment |
I just run npm install
and then ok.
add a comment |
I just run npm install
and then ok.
I just run npm install
and then ok.
answered Dec 4 '17 at 21:25
Lasith NiroshanLasith Niroshan
14939
14939
add a comment |
add a comment |
npm install --save-dev @angular/cli@latest this command is working fine for me ubuntu 16.04 lts
add a comment |
npm install --save-dev @angular/cli@latest this command is working fine for me ubuntu 16.04 lts
add a comment |
npm install --save-dev @angular/cli@latest this command is working fine for me ubuntu 16.04 lts
npm install --save-dev @angular/cli@latest this command is working fine for me ubuntu 16.04 lts
answered Aug 31 '17 at 7:41
AkalyvanAkalyvan
47112
47112
add a comment |
add a comment |
Just to add to this. You will get this error too, when you are running ng serve
not from within your project folder. So always make sure your bash runs from your project folder.
add a comment |
Just to add to this. You will get this error too, when you are running ng serve
not from within your project folder. So always make sure your bash runs from your project folder.
add a comment |
Just to add to this. You will get this error too, when you are running ng serve
not from within your project folder. So always make sure your bash runs from your project folder.
Just to add to this. You will get this error too, when you are running ng serve
not from within your project folder. So always make sure your bash runs from your project folder.
answered Oct 30 '17 at 10:23
KarlKarl
111
111
add a comment |
add a comment |
Try this
- npm uninstall angular-cli
- npm install @angular/cli --save-dev
add a comment |
Try this
- npm uninstall angular-cli
- npm install @angular/cli --save-dev
add a comment |
Try this
- npm uninstall angular-cli
- npm install @angular/cli --save-dev
Try this
- npm uninstall angular-cli
- npm install @angular/cli --save-dev
answered Jan 2 at 21:32
Rahul VermaRahul Verma
2218
2218
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f42585663%2fcannot-find-module-angular-compiler%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown