找不到模块 node_modules@ionicapp-scripts IONIC 3 [英] Cannot find module node_modules@ionicapp-scripts IONIC 3
问题描述
我已经安装了 npm 3.10.10
然后我已经 安装了 ionic 3.9.2
和 cordova 7.0.1
.
我尝试了以下步骤:
离子启动新项目
(选择了一个标签项目)
离子服务
这个命令会throw
error
错误:找不到模块'E:firstProject ode_modules@ionicapp-scripts'
我只找到了这个线程
编辑 2:(在 sampath 回答之后)
- 我做了以下更改
<块引用>
我删除了`"@ionic/app-scripts": "2.1.4"`
- <块引用>
$ npm install @ionic/app-scripts@latest --save-dev
发布 $ npm install @ionic/app-scripts@latest --save-dev , package.json文件如下所示
请帮助我提前谢谢!!!!
各位,我解决了这个问题.只是想与您分享以至少节省您的时间.按照步骤操作.
- 删除
node_modules
. - 将节点降级到版本 6(运行
npm install node@6
或brew install node@6
) - 在
project.json
的依赖项下添加 npm i
"@ionic/app-scripts": "3.1.9"
I have installed npm 3.10.10
then i have installed ionic 3.9.2
and cordova 7.0.1
.
i have tried the following steps:
ionic start newProject
(selected a tabs project)
ionic serve
this command will throw
the error
Error: Cannot find module 'E:firstProject ode_modules@ionicapp-scripts'
i found only this thread Error: Cannot find module '@ionic/app-scripts'.
i don't want to downgrade my nodejs version,as i want to use latest feature
but i tried,
npm i @ionic/app-scripts
(SAG Answer)
i'm getting same error
after executing above command
please help me without downgrading nodejs
version
EDIT 1 (as per sampath suggestion) : below is my package.json
file
{
"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"
}
when i run ionic info
it is giving some kind of error
$ ionic info
EDIT 2: (After sampath Answer)
- i did the following changes
i removed `"@ionic/app-scripts": "2.1.4"`
$ npm install @ionic/app-scripts@latest --save-dev
post $ npm install @ionic/app-scripts@latest --save-dev , package.json file will look like below
please help me thanks in advance!!!!
Guys i solved this issue. Just want to share with you to save your time at least. Follow steps.
- Remove
node_modules
. - Downgrade Node to version 6 (run
npm install node@6
orbrew install node@6
) - Add
"@ionic/app-scripts": "3.1.9"
under dependencies inproject.json
npm i
这篇关于找不到模块 node_modules@ionicapp-scripts IONIC 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!