ionic cordova resources 命令報錯

ionic cordova resources 命令報錯

Something went wrong installing the “sharp” module
[cordova-res]
[cordova-res] Cannot find module ‘…/build/Release/sharp.node’
[cordova-res]
[cordova-res] - Remove the “node_modules/sharp” directory, run “npm install” and look for errors
[cordova-res] - Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
[cordova-res] - Search for this error at https://github.com/lovell/sharp/issues
[cordova-res]
[ERROR] An error occurred while running subprocess cordova-res.

    cordova-res exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

git上面作者的回答

“Pre-compiled binaries for sharp are provided for use with Node versions 6, 8 and 10 on 64-bit Windows, OS X and Linux platforms.”

翻譯:爲64位Windows,OS X和Linux平臺上的節點版本6,8和10提供了用於sharp的預編譯二進制文件
意思就是sharp的node版本暫時只支持 6 8 10
切到支持的版本就行了 然後裝了個10.8.0 完美!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章