问题1.node-sass安装失败

 解决方案: 1.安装cnpm,配置环境变量(npm install -g cnpm --registry=https://registry.npm.taobao.org)

           2.进入到项目目录下,执行cnpm install node-saas出现问题,可以执行  cnpm install node-sass@latest

                     3.或者直接执行cnpm install ,然后 npm run dev运行项目

问题2.  没有安装 python 

解决:下载python 安装包(python-2.7.3.msi),

       执行1.npm install --global --production windows-build-tools

              2.npm install --global node-gyp

å¨è¿éæå¥å¾çæè¿°

问题2.  npm install --global --production windows-build-tools 出现以下信息:

"ErrorCode":"1714","PackagesAppliesTo":[],"CommonErrorMessage":"**Error Code 1714: Cannot uninstall older version of an MSI**\r\nAn older version of an MSI is on your computer. You will need to uninstall it before you can install Visual Studio.\r\n\r\n**Fix**: Please try the recommended steps to
[troubleshoot MSI errors 1714 and 1612](https://aka.ms/VSMSIError)","Resources":[{"Locale":"en-us","Message":"**Error Code 1714: Cannot uninstall older version of an MSI**\r\nAn older version of an MSI is on your computer. You will need to uninstall it before you can install Visual Studio.\r\n\r\n**Fix
**: Please try the recommended steps to [troubleshoot MSI errors 1714 and 1612](https://aka.ms/VSMSIError)"}]}]},"Precedence":0,"RuleId":"818EBFDE-E794-4A31-AA70-2C427B920C33"},{"Action":{"Rules":[{"ErrorCode":"0x80096004","PackagesAppliesTo":[],"CommonErrorMessage":"**Error 0x80096004: Signature
 can't be verified**\r\nThere is a problem verifying the signature of a certificate. This usually happens when a package has been damaged.\r\n\r\n**FIX**: First, select View Logs to get the name of the damaged package. In File Explorer, delete that package from the ProgramData\\Microsoft\\VisualStudio\
\Packages folder and try installing Visual Studio again. If you are installing from a local or network layout, try following the recommended steps to [update a network–based installation of Visual Studio.](https://docs.microsoft.com/en-us/visualstudio/install/update-a-network-installation-of-visual-stu
dio)","Resources":[{"Locale":"en-us","Message":"**Error 0x80096004: Signature can't be verified**\r\nThere is a problem verifying the signature of a certificate. This usually happens when a package has been damaged.\r\n\r\n**FIX**: First, select View Logs to get the name of the damaged package. I
n File Explorer, delete that package from the ProgramData\\Microsoft\\VisualStudio\\Packages folder and try installing Visual Studio again. If you are installing from a local or network layout, try following the recommended steps to [update a network–based installation of Visual Studio.](https://docs.m
icrosoft.com/en-us/visualstudio/install/update-a-network-installation-of-visual-studio)"}]}]},"Precedence":0,"RuleId":"8A7E5F65-4C5B-43ED-8360-6542C6FC958C"},{"Action":{"Rules":[{"ErrorCode":"-2147024891","PackagesAppliesTo":["Win10SDK_Hidden_10.0.10240_2","Win10SDK_10.0.10586.212","Win10SDK_10.0.14393.795",
"Win10SDK_10.0.15063","Win10SDK_10.0.16299","Win10SDK_10.0.17134","Win10SDK_10.0.17763","Win10SDK_IpOverUsb","Win10_Emulator_10.0.14393.0","Win10_Emulator_10.0.15063","Win10_Emulator_10.0.15254"],"CommonErrorMessage":"**Error -2147024891: Access is denied**\r\nThere is a problem accessing the registry
or file system of this machine. This can happen if Windows Defender or other anti-virus software is restricting access. \n \r\n\r\n**FIX**: Please review your anti-virus settings and ensure the Visual Studio Installer has unrestricted access to the registry and file system.","Resources":[{"Locale":"en-
us","Message":"**Error -2147024891: Access is denied**\r\nThere is a problem accessing the registry or file system of this machine. This can happen if Windows Defender or other anti-virus software is restricting access. \n \r\n\r\n**FIX**: Please review your anti-virus settings and ensure the Vis
ual Studio Installer has unrestricted access to the registry and file system."}]}]},"Precedence":0,"RuleId":"95BA07F6-0D32-4903-8507-8708A7B20898"},{"Action":{"Rules":[{"ErrorCode":"0x80072efd","PackagesAppliesTo":["Cocos2DV1"],"CommonErrorMessage":"**Error Code 0x80072efd: Cocos may not be available t
o you based on your current connection**\r\n\r\n**Fix**: If you’ve experienced this error, please visit [their website](https://cocos2d-x.org/download) and attempt to download and install the component from there. Afterwards, you can install by clicking \"Modify\" and then \"Install\". If you are stil
l unable to acquire the component, please disable Cocos to address this warning in the installation.","Resources":[{"Locale":"en-us","Message":"**Error Code 0x80072efd: Cocos may not be available to you based on your current connection**\r\n\r\n**Fix**: If you’ve experienced this error, please v
isit [their website](https://cocos2d-x.org/download) and attempt to download and install the component from there. Afterwards, you can install by clicking \"Modify\" and then \"Install\". If you are still unable to acquire the component, please disable Cocos to address this warning in the installation."},{"L
ocale":"fr-fr","Message":"**Code d'erreur 0x80072efd: Cocos n'est peut-être pas disponible d'après votre connexion actuelle. Correctif : Si vous avez rencontré cette erreur, accédez à [leur site web](https://cocos2d-x.org/download), puis tentez de télécharger et d'installer le composant à partir de cet
 emplacement.  Vous pourrez ensuite l'installer en cliquant sur Modifier, puis Installer. Si, malgré tout, vous ne parvenez pas à obtenir le composant, désactivez Cocos pour mettre fin à cet avertissement durant l'installation."},{"Locale":"it-it","Message":"**Codice errore 0x80072efd: Cocos potrebbe n
on essere disponibile in base alla connessione corrente. Correzione: se si è verificato questo errore, visitare il [sito Web](https://cocos2d-x.org/download) e provare a scaricare e installare il componente. Successivamente, è possibile eseguire l'installazione facendo clic su \"Modifica\", quindi su \"Insta
lla\". Se non è ancora possibile acquisire il componente, disabilitare Cocos per risolvere l'avviso nell'installazione."},{"Locale":"cs-cz","Message":"**Kód chyby 0x80072efd: Cocos možná nebude na základě vašeho aktuálního připojení k dispozici. Oprava: Pokud k této chybě došlo, navštivte prosím [přísl
ušný web](https://cocos2d-x.org/download) a zkuste součást stáhnout a nainstalovat tam. Pak můžete instalaci provést tak, že kliknete na Upravit a následně na Nainstalovat. Pokud se vám součást stále nedaří získat, zakažte prosím Cocos možnost reagovat na toto upozornění v instalaci."},{"Locale":"de-de","Mes
sage":"**Fehlercode 0x80072efd: Cocos ist je nach Ihrer aktuellen Verbindung möglicherweise nicht für Sie verfügbar. Fix: Wenn dieser Fehler aufgetreten ist, besuchen Sie [die entsprechende Website](https://cocos2d-x.org/download), und versuchen Sie, die Komponente von dort herunterzuladen und zu insta
llieren. Anschließend können Sie die Installation durch Klicken auf \"Ändern\" und \"Installieren\" durchführen. Wenn Sie die Komponente noch immer nicht abrufen können, deaktivieren Sie Cocos, um diese Warnung in der Installation zu verarbeiten."},{"Locale":"es-es","Message":"**Código de error 0x80072efd&co
lon; Cocos puede no estar disponible en función de la conexión actual. Corregir: si ha experimentado este error, visite [el sitio web correspondiente](https://cocos2d-x.org/download)  e intente descargar e instalar el componente desde ahí. A continuación, puede hacer clic en \"Modificar\" y, después, en \"In
stalar\" para instalarlo. Si aun así no puede adquirir el componente, deshabilite Cocos para solucionar esta advertencia en la instalación."},{"Locale":"ja-jp","Message":"* * エラーコード 0x80072efd: 現在の接続では Cocos を使用できない可能性があります。修正: このエラーが発生した場合は、 [このウェブサイ
ト](https://cocos2d-x.org/download) にアクセスして、そこからコンポーネントをダウンロードしてインストールしてみてください。 後で [変更] をクリックしてから [インストール] をクリックしてインストールすることができます。それでもコンポーネントを取得できない場合は、Cocos を無効にしてインストールでこの警告を解決しま
す。"},{"Locale":"ko-kr","Message":"**오류 코드 0x80072efd: 현재 연결에서는 Cocos을(를) 사용할 수 없습니다. 해결 방법: 이 오류가 발생한 경우 [관련 웹 사이트](https://cocos2d-x.org/download)를 방문하여 해당 구성 요소를 다운로드 및 설치하세요. 그런 다음, \"수정\"과 \"설치\"를 차례로 클릭하여 설치할 수 있
습니다. 계속 해당 구성 요소를 설치할 수 없는 경우 Cocos을(를) 사용하지 않도록 설정하여 설치에서 이 경고를 해결하세요."},{"Locale":"pl-pl","Message":"** Kod błędu 0x80072efd: Produkt Cocos może być niedostępny, biorąc pod uwagę bieżące połączenie. Rozwiązanie: Jeśli wystąpił ten błąd, odwiedź [witrynę i
nternetową produktu](https://cocos2d-x.org/download) i spróbuj pobrać oraz zainstalować składnik stamtąd. Następnie możesz przeprowadzić instalację, klikając pozycję „Modyfikuj”, a następnie pozycję „Zainstaluj”. Jeśli nadal nie możesz uzyskać składnika, wyłącz produkt Cocos, aby rozwiązać problem tego ost
rzeżenia na etapie instalacji."},{"Locale":"pt-br","Message":"**Código de Erro 0x80072efd: Cocos pode não estar disponível com base na sua conexão atual. Correção: se você tiver recebido esse erro, visite [o site deles](https://cocos2d-x.org/download) e tente baixar e instalar o componente de lá. Após
o download, você poderá instalar clicando em \"Modificar\" e, em seguida, em \"Instalar\". Se você ainda não conseguiu adquirir o componente, desabilite Cocos para resolver este aviso na instalação."},{"Locale":"ru-ru","Message":"**Код ошибки 0x80072efd: Cocos может быть недост
упен в зависимости от вашего текущего подключения. Исправление: если вы столкнулись с этой ошибкой, посетите [их сайт](https://cocos2d-x.org/download) и попробуйте скачать и установит
ь компонент оттуда. Впоследствии вы можете выполнить установку, выбрав \"Изменить\" и затем \"Установить\". Если вы по-прежнему не можете получить компонент, отключите Cocos,
чтобы устранить это предупреждение в установке."},{"Locale":"tr-tr","Message":"**Hata Kodu 0x80072efd: Geçerli bağlantınıza dayalı olarak, Cocos kullanılamıyor olabilir. Düzeltme: Bu hatayla karşılaştıysanız lütfen [web sitelerini](https://cocos2d-x.org/download
) ziyaret ederek bileşeni oradan indirip yüklemeyi deneyin. Daha sonra \"Değiştir\" ve ardından \"Yükle\" seçeneğine tıkayarak bileşeni yükleyebilirsiniz. Bileşeni yine de alamıyorsanız, lütfen yüklemede bu uyarıyı gidermek için Cocos öğesini devre dışı bırakın."},{"Locale":"zh-cn","Message":"**错误代码 0x80
072efd: 基于你的当前连接,Cocos 可能不可用。修复: 如果遇到此错误,请访问[其网站](https://cocos2d-x.org/download),并尝试从此处下载和安装组件。然后,可依次单击“修改”和“安装”进行安装。如果仍无法获取组件,请禁用 Cocos 以在安装中处理此警告。"},{"Locale":"zh-tw","Message":"**錯誤碼 0x80072efd: 根
據您目前的連線,Cocos 可能無法使用。修正方式: 若您發生此錯誤,請前往[他們的網站](https://cocos2d-x.org/download),然後嘗試從該處下載並安裝元件,之後即可依序按一下 [修改] 與 [安裝] 來予以安裝。若您仍無法取得元件,請停用 Cocos 以解決安裝中的這項警告。"}]}]},"Precedence":0,"RuleId":"AFBE5FF9-2F41-47EE-BD0E-077B
BC5F2184"},{"Action":{"Rules":[{"ErrorCode":"1618","PackagesAppliesTo":[],"CommonErrorMessage":"**Error 1618: Another installation in progress**\r\nAnother program is using the Windows Installer Service. This might be due to an automatic update.\r\n\r\n**Fix**: If Windows is installing updates, w
e recommend that you wait until the update is complete. If an installation did not close properly, select the Processes tab in Task Manager to locate and stop any MSIExec.exe entries. You can also restart your computer and try installing again.","Resources":[{"Locale":"en-us","Message":"**Error 1618: A
nother installation in progress**\r\nAnother program is using the Windows Installer Service. This might be due to an automatic update.\r\n\r\n**Fix**: If Windows is installing updates, we recommend that you wait until the update is complete. If an installation did not close properly, select the Process
es tab in Task Manager to locate and stop any MSIExec.exe entries. You can also restart your computer and try installing again."}]}]},"Precedence":0,"RuleId":"B0F3C77A-61DC-4C6E-945B-60B6519BC988"},{"Action":{"Rules":[{"ErrorCode":"1601","PackagesAppliesTo":[],"CommonErrorMessage":"**Error 1601: Window
s Installer Service unavailable**\r\nThere is a problem with the Windows Installer Service, or it has been turned off.\r\n\r\n**Fix**: This problem usually resolves when you retry the Visual Studio installation after one of the following workarounds.\r\n1. Restart your computer. \r\n2. Make sure Window
s Installer Service is turned on. Run Services.msc and double-click on Windows Installer. If it has turned off, change Status to Manual, then select Apply and OK. If it is already running, select Stop and then Start. \r\n3. If you are still getting this problem, try the [recommended Windows Installer service
 troubleshooting steps](https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed).","Resources":[{"Locale":"en-us","Message":"**Error 1601: Windows Installer Service unavailable**\r\nThere is a problem with the Windows Installer Service, or it has
been turned off.\r\n\r\n**Fix**: This problem usually resolves when you retry the Visual Studio installation after one of the following workarounds.\r\n1. Restart your computer.\r\n2. Make sure Windows Installer Service is turned on. Run Services.msc and double-click on Windows Installer. If it is turn
ed off, change Status to Manual, then select Apply and OK. If it is already running, select Stop and then Start.\r\n3. If you are still getting this problem, try the [recommended Windows Installer service troubleshooting steps](https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-f
rom-being-installed-or-removed))"}]}]},"Precedence":0,"RuleId":"DFC5CD1E-D038-4A37-B5DD-82A4D220E0B9"}]
解决方案:

  1.下载CocosCreator_v2.3.0_20200215_win.7z,独立安装

  2.继续运行npm install --global --production windows-build-tools

最后可以删除node_modules 下的文件,重新安装

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐