添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
着急的跑步鞋  ·  Fix 'Binding Element ...·  1 月前    · 
想发财的野马  ·  博士申请 | ...·  2 月前    · 
小胡子的日光灯  ·  Using with TypeScript ...·  4 月前    · 
月球上的红金鱼  ·  Automatically prompt ...·  6 月前    · 

Can someone help me, please, with this error? I’m a beginner user and dont know what to do with this.

Thanks!

Thank you for your answer and I realy sorry by my ignorance. I tried the command npm delete app-scripts but the command was not known. Tried apm delete app-scripts but the answer was:

Uninstalling app-scripts failed
Failed to delete app-scripts: Does not exist

I realy dont know how to uninstall it.

On trying to install app-scripts (npm install -g app-scripts) the answer was:

C:\Users\cleon\AppData\Roaming\npm
`-- [email protected]

ionic info

[ERROR] Error with .\node_modules@ionic\app-scripts\package.json file: FILE_NOT_FOUND

cli packages:

@ionic/cli-plugin-ionic-angular : 1.4.0 (C:\Users\cleon\documents\aplicativos\app001p\node_modules\@ionic\cli-plugin-ionic-angular)
@ionic/cli-utils                : 1.6.0 (C:\Users\cleon\documents\aplicativos\app001p\node_modules\@ionic\cli-utils)
ionic (Ionic CLI)               : 3.6.0 (C:\Users\cleon\documents\aplicativos\app001p\node_modules\ionic)

local packages:

@ionic/app-scripts : not installed
Ionic Framework    : ionic-angular 3.6.0

System:

Node : v6.11.1
OS   : Windows 10
npm  : 3.10.10

Nobody said you should uninstall app-scripts. It’s called @ionic/app-scripts and not installed for you in the first place - that is the problem.

Delete the node_modules folder in you Ionic project by right-clicking on it and selecting “Delete”. Then do the rest of the things I posted.

Thank you. I did as you said now:

PS C:\Users\cleon\Documents\APLICATIVOS\App001p> npm install
[email protected] C:\Users\cleon\Documents\APLICATIVOS\App001p
±- @angular/[email protected]
±- @angular/[email protected]
±- @angular/[email protected]
| ±- @angular/[email protected]
| | ±- [email protected]
| | | ±- [email protected]
| | | | -- [email protected] | | | +-- [email protected] | | |[email protected]
| | -- UNMET PEER DEPENDENCY typescript@^2.1.0 | +-- [email protected] | +-- [email protected] |– UNMET PEER DEPENDENCY typescript@^2.1.5
±- @angular/[email protected]
±- @angular/[email protected]
±- @angular/[email protected]
±- @angular/[email protected]
±- @angular/[email protected]
±- @ionic-native/[email protected]
±- @ionic-native/[email protected]
±- @ionic-native/[email protected]
±- @ionic/[email protected]
| ±- @types/[email protected]
| ±- [email protected]
| | -- [email protected] | | +-- [email protected] | | | +-- [email protected] | | | +-- [email protected] | | | | +-- [email protected] | | | |[email protected]
| | | | -- [email protected] | | |[email protected]
| | ±- [email protected]
| | ±- [email protected]
| | | ±- [email protected]
| | | | ±- [email protected]
| | | | ±- [email protected]
| | | | -- [email protected] | | |[email protected]
| | | ±- [email protected]
| | | | ±- [email protected]
| | | | ±- [email protected]
| | | | -- [email protected] | | |[email protected]
| | -- [email protected] | | +-- [email protected] | |[email protected]
| | ±- [email protected]
| | ±- [email protected]
| | -- [email protected] |[email protected]
±- [email protected]
±- [email protected]
±- [email protected]
| -- [email protected] +-- [email protected] | +-- [email protected] | |[email protected]
| -- [email protected][email protected]

npm WARN @angular/[email protected] requires a peer of typescript@^2.0.2 but none was installed.
npm WARN @angular/[email protected] requires a peer of typescript@^2.1.5 but none was installed.
npm WARN [email protected] requires a peer of typescript@^2.1.0 but none was installed.

After run ionic info the results are:

[ERROR] Error with .\node_modules@ionic\app-scripts\package.json file: FILE_NOT_FOUND

cli packages: (C:\Users\cleon\Documents\APLICATIVOS\App001p\node_modules)

@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils                : 1.7.0
ionic (Ionic CLI)               : 3.7.0

local packages:

@ionic/app-scripts : not installed
Ionic Framework    : ionic-angular 3.6.0

System:

Node : v6.11.1
OS   : Windows 10
npm  : 3.10.10

I was not sure what “post your package.json” means, so I opened it with notes. I hope was it…

App001p:

"name": "App001p", "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.3", "@ionic/cli-plugin-ionic-angular": "1.4.1", "ionic": "3.7.0", "typescript": "2.3.4" "description": "An Ionic project"

BLANK

"name": "blank", "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.3", "@ionic/cli-plugin-ionic-angular": "1.4.1", "ionic": "3.7.0", "typescript": "2.3.4" "description": "An Ionic project"

Running ionic serve at the new blank app, the result is the same: Error: Cannot find module ‘typescript’

Your devDependencies are not being installed…

Can you run ionic start blank2 blank --verbose please and post the output here?

Also in your original project, run npm install @ionic/app-scripts @ionic/cli-plugin-ionic-angular ionic typescript and see if this fixes things. Try to run ionic info after doing this. (THis is not the solution, just a workaround to try finding out what is wrong)

Great, Sujan12, it worked!

here are the results of running ionic start blank2 blank --verbose:

PS C:\Users\cleon\Documents\APLICATIVOS> ionic start blank2 blank --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'C:\\Users\\cleon\\Documents\\APLICATIVOS', local: false, binPath:
        'C:\\Users\\cleon\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath:
        'C:\\Users\\cleon\\AppData\\Roaming\\npm\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] Loading global plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for global @ionic/cli-plugin-proxy
[DEBUG] globalDeps=
[WARN] Git CLI not found on your PATH. You may wish to install it to version control your app.
       See installation docs for git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
       Use --no-git to disable this warning.
√ Creating directory .\blank2 - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
√ Downloading - done!
[INFO] Fetching starter template blank (https://github.com/ionic-team/ionic2-starter-blank/archive/master.tar.gz)
√ Downloading - done!
√ Updating package.json with app details - done!
√ Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!
> npm install
Running command - done!
[DEBUG] localDeps=ionic,@ionic/cli-plugin-ionic-angular
> npm install --save-dev --save-exact ionic@latest
√ Running command - done!
> npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest
√ Running command - done!
> npm dedupe
√ Running command - done!
♬♫♬♫ Your Ionic app is ready to go! ♬♫♬♫
Run your app in the browser (great for initial development):
  ionic serve
Run on a device or simulator:
ionic cordova run ios
Test and share your app on a device with the Ionic View app:
  http://view.ionic.io
Next Steps:
Go to your newly created project: cd .\blank2

And the results of ionic info:

PS C:\Users\cleon\Documents\APLICATIVOS\App001p> ionic info
cli packages: (C:\Users\cleon\Documents\APLICATIVOS\App001p\node_modules)
    @ionic/cli-plugin-ionic-angular : 1.4.1
    @ionic/cli-utils                : 1.7.0
    ionic (Ionic CLI)               : 3.7.0
local packages:
    @ionic/app-scripts : 2.1.3
    Ionic Framework    : ionic-angular 3.6.0
System:
    Node : v6.11.1
    OS   : Windows 10
    npm  : 3.10.10

Thank you for your help and your patience.

Hey guys,
Having a similar issue though the above didn’t work.

This is the error I’m getting:

Blockquote
Error: Cannot find module ‘typescript’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\kierandes\Documents\DSF\Apps\CSA\main\node_modules@ionic\app-scripts\dist\transpile.js:42:10)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

Thanks in advance,
Kieran

I got exactly the same error. Have you found any solution yet? I did run $ ionic start blank2 blank --verbose
in a folder above my project, but it didn’t work