我以管理员身份运行cmd并键入以下命令:
npm init wasm-app www
但是它不起作用。我想知道为什么?它显示此错误:
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Rathod\AppData\Roaming\npm-cache\_npx\16292" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Harsh Rathod\AppData\Roaming\npm-cache\_logs\2020-04-04T10_05_04_450Z-debug.log
Install for [ 'create-wasm-app@latest' ] failed with code 1
答案 0 :(得分:1)
下面给出的hack对我有用:
npm install -g create-wasm-app
npx create-wasm-app www