在离子中创建应用程序时出错

时间:2017-08-10 15:24:57

标签: cordova ionic-framework ionic2 dependencies command-line-interface

我刚刚开始离子并希望开始创建一个应用程序,但它在安装cordova dependecies时给了我以下错误:

root@ubuntu:/home/asc# ionic start app1
? What starter would you like to use: conference
? Would you like to integrate your new app with Cordova to target native iOS and
 Android? Yes
✔ Creating directory ./app1 - done!
[INFO] Fetching app base
       (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
✔ Downloading - done!
[INFO] Fetching starter template conference
       (https://github.com/ionic-team/ionic-conference-app/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 - failed!
[ERROR] An error occurred while running npm install (exit code 1):

        npm ERR! code EINTEGRITY
        npm ERR! sha1-3hnuc77yGrPAdAo3sz22JGS6ves= integrity checksum failed
        when using sha1: wanted sha1-3hnuc77yGrPAdAo3sz22JGS6ves= but got
        sha1-ZON8WQs6HaRM5U/GT5PKi7Nbgfg=. (4998 bytes)

        npm ERR! A complete log of this run can be found in:
        npm ERR! /root/.npm/_logs/2017-08-10T15_04_19_085Z-debug.log

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

npm cache clean --force

这个做了神奇!