我已經安裝了npm 3.10.10
,然後我有installed ionic 3.9.2
和cordova 7.0.1
。找不到module node_modules @ionic app-scripts IONIC 3
我已經嘗試以下步驟:
ionic start newProject
(選擇了製表符項目)
ionic serve
- 我做了以下改變
-
$ npm install @ionic/[email protected] --save-dev
此命令將throw
的error
Error: Cannot find module 'E:\firstProject\node_modules\@ionic\app-scripts'
我只找到這個線程Error: Cannot find module '@ionic/app-scripts'。
我不想我的降級版本的NodeJS,因爲我想使用最新的功能
但我想,
npm i @ionic/app-scripts
(SAG回答)
我是在執行完之後得到相同的error
command
請求SE幫我沒有降級nodejs
version
EDIT 1(按薩姆帕斯建議):下面是我package.json
文件
{
"name": "firstProject",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@ionic-native/core": "3.12.1",
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.6.0",
"ionicons": "3.0.0",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "2.1.4",
"typescript": "2.3.4"
},
"description": "An Ionic project"
}
當我運行ionic info
它給了某種錯誤
$ ionic info
編輯2:(後薩姆帕斯應答)
i removed `"@ionic/app-scripts": "2.1.4"`
post $ npm install @ionic/[email protected] --save-dev , package.json file will look like below
請幫我在此先感謝!!!!
你可以顯示'package.json'文件和'離子信息'嗎? – Sampath
喜薩姆帕斯你可以看到它在** ** EDIT1 – EaB
薩姆帕斯請幫我與上面的'error' – EaB