我是混合移动编程的初学者,经过一番理论研究后,我决定尝试使用IONIC进行练习。
首先,我使用
安装了nodejs,npm和ionic。$sudo apt-get install nodejs
$sudo apt-get install npm
$sudo npm install -g ionic
可以看到没问题。
$ nodejs -v
v8.10.0
$ npm -v
3.5.2
$ ionic -v
5.4.5
第二,当我开始选择Angularjs和Tabs的新项目时
$ ionic start MyFirstApp
我收到了那些错误
> npm i
loadDevDep:typescript → r ▌ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular-devkit/build-angular@0.801.3: wanted: {"node":">=loadDevDep:typescript → g ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular-devkit/architect@0.801.3: wanted: {"node":">= 10.loadDevDep:typescript → r ▌ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular/cli@8.1.3: wanted: {"node":">= 10.9.0","npm":">= loadDevDep:typescript → a ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular-devkit/schematics@8.1.3: wanted: {"node":">= 10.9loadDevDep:typescript → a ▌ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular-devkit/core@8.1.3: wanted: {"node":">= 10.9.0","nloadDep:worker-plugin → r ▄ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @ngtools/webpack@8.1.3: wanted: {"node":">= 10.9.0","npm":">= 6.2.0"} (current: {"node":"8.10.0","npm":"3.5.2"})
WARN engine @angular-devkit/build-optimizer@0.801.3: wanted: {"node":">= 10.9.0","npm":">= 6.2.0"} (current: {"node":"8.10.0","npm":"3.5.2"}loadDep:worker-plugin → g ▄ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine @angular-devkit/build-webpack@0.801.3: wanted: {"node":">=loadDep:fsevents → afterA ▐ ╢█████████████░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine fsevents@2.1.1: wanted: {"node":"^8.16.0 || ^10.6.0 || >=1npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@2.1.1
npm ERR! Linux 5.0.0-31-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! file /home/ange/.npm/is-extendable/0.1.1/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! No data, empty input at 1:1
npm ERR!
npm ERR! ^
npm ERR! File: /home/ange/.npm/is-extendable/0.1.1/package/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /home/ange/IonicProject/MyFirstApp/npm-debug.log
[ERROR] An error occurred while running subprocess npm.
npm i exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.