找不到模块 node_modules@ionicapp-scripts IONIC 3 [英] Cannot find module node_modules@ionicapp-scripts IONIC 3

查看:18
本文介绍了找不到模块 node_modules@ionicapp-scripts IONIC 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 npm 3.10.10 然后我已经 安装了 ionic 3.9.2cordova 7.0.1.

我尝试了以下步骤:

  1. 离子启动新项目

    (选择了一个标签项目)

  1. 离子服务

这个命令会throw error

<块引用>

错误:找不到模块'E:firstProject ode_modules@ionicapp-scripts'

我只找到了这个线程

编辑 2:(在 sampath 回答之后)

  1. 我做了以下更改

<块引用>

我删除了`"@ionic/app-scripts": "2.1.4"`

  1. <块引用>

    $ npm install @ionic/app-scripts@latest --save-dev

<块引用>

发布 $ npm install @ionic/app-scripts@latest --save-dev , package.json文件如下所示

请帮助我提前谢谢!!!!

解决方案

各位,我解决了这个问题.只是想与您分享以至少节省您的时间.按照步骤操作.

  1. 删除 node_modules.
  2. 将节点降级到版本 6(运行 npm install node@6brew install node@6)
  3. project.json
  4. 的依赖项下添加"@ionic/app-scripts": "3.1.9"
  5. npm i

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:

  1. ionic start newProject

    (selected a tabs project)

  1. 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)

  1. i did the following changes

i removed `"@ionic/app-scripts": "2.1.4"`

  1. $ 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.

  1. Remove node_modules.
  2. Downgrade Node to version 6 (run npm install node@6 or brew install node@6)
  3. Add "@ionic/app-scripts": "3.1.9" under dependencies in project.json
  4. npm i

这篇关于找不到模块 node_modules@ionicapp-scripts IONIC 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆