【HarmonyOS】DevEco Studio 3.1 Beta2 failed to download SDK

[Keywords]
DevEco Studio 3.1 Beta2, @webassemblyjs/[email protected], failed to download SDK

 

[Problem Description]
DevEco Studio 3.1 Beta2 version, when downloading API 9 SDK, npm install download reports an error "error nottarget No matching version found for @webassemblyjs/[email protected].", as shown in the figure below

cke_2778.png

 

[Problem analysis]
After investigation,
1) @webassemblyjs/[email protected] version is the latest version, check the address:
https://www.npmjs.com/package/@webassemblyjs/ast?activeTab=versions
If you install the nodejs version For 16.x, execute npm install @webassemblyjs/[email protected] and download
will
fail Version nodejs, after executing npm cache clean -f to clear the cache, re-download is also successful

Possible reasons: The npm caching mechanism causes the @webassemblyjs/[email protected] version to not be found. When downloading the SDK, it depends on the latest version of @webassemblyjs/ast. The failure to download the @webassemblyjs/[email protected] version results in a failure to download the SDK

 

[Problem Avoidance Solution]
Method 1: Execute npm cache clean -f to clear the cache and re-download;
Method 2: After reinstalling nodejs version 14.21.3 or 14.x, re-download the SDK. The nodejs version can be downloaded from the official website.

 

[Question summary]
If npm install fails to download the installation package, but this version has been released on the npm official website, it may be due to nodejs version compatibility or cache issues, you can try to clear the cache or replace the nodejs version

 

 For more comprehensive technical articles, please visit https://developer.huawei.com/consumer/cn/forum/?ha_source=zzh

{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/4478396/blog/8806586