#node.js #angular #ionic-framework #ionic2
#node.js #угловой #ionic-framework #ionic2
Вопрос:
я новичок на этом веб-сайте, я использую ionic 2, когда я создаю новый проект и запускаю npm run build, я получаю эту ошибку, я попытался удалить все файлы и установить снова, но безуспешно.
npm run build
> ionic-hello-world@ build C:UsersJohndevemyEventApp
> ionic-app-scripts build --rollup ./config/rollup.config.js
[20:39:57] ionic-app-scripts 0.0.30
[20:39:57] build prod started ...
[20:39:57] clean started ...
[20:39:57] clean finished in 6 ms
[20:39:57] copy started ...
[20:39:57] ngc started ...
[20:39:57] lint started ...
[20:39:57] lint failed: Unable to find "tslint" command: null
[20:39:57] Error: Unable to find "tslint" command: null
at C:UsersAdirdevemyEventAppnode_modules@ionicapp-scriptsdistlint.js:38:20
at runTsLint (C:UsersAdirdevemyEventAppnode_modules@ionicapp-scriptsdistlint.js:35:12)
at C:UsersAdirdevemyEventAppnode_modules@ionicapp-scriptsdistlint.js:22:13
at FSReqWrap.oncomplete (fs.js:123:15)
[20:39:58] copy finished in 33 ms
[20:39:58] ngc failed: Unable to find Angular Compiler "ngc" command: null. Please ensure @angular/compiler-cli has been installed with NPM.
[20:39:58] Error: Unable to find Angular Compiler "ngc" command: null. Please ensure @angular/compiler-cli has been installed with NPM.
at C:UsersAdirdevemyEventAppnode_modules@ionicapp-scriptsdistngc.js:40:20
at runNgc (C:UsersAdirdevemyEventAppnode_modules@ionicapp-scriptsdistngc.js:34:12)
at C:UsersAdirdevemyEventAppnode_modules@ionicapp-scriptsdistngc.js:18:16
Error running ionic app script "build": Error: Unable to find Angular Compiler "ngc" command: null. Please ensure @angular/compiler-cli has been installed with NPM.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v6.8.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ build: `ionic-app-scripts build --rollup ./config/rollup.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ build script 'ionic-app-scripts build --rollup ./config/rollup.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:UsersAdirdevemyEventAppnpm-debug.log
C:UsersAdirdevemyEventApp>
я просто обновил свой npm до 3.10.8, и мой node.js до 6.8.0
я действительно не знаю, в чем причина.