最新版本npx create app命令行无法创建项目报错:Must use import to load ES Modul
Created by: yinlianghui
node版本12.22.9,steedos-cli刚安装的,版本为2.1.73
拨VPN也没用,报错信息:
Must use import to load ES Module: /Users/yinlianghui/.npm/_npx/56761/lib/node_modules/create-steedos-app/node_modules/@geek/spinner/node_modules/chalk/source/index.js
require() of ES modules is not supported.
require() of /Users/yinlianghui/.npm/_npx/56761/lib/node_modules/create-steedos-app/node_modules/@geek/spinner/node_modules/chalk/source/index.js from /Users/yinlianghui/.npm/_npx/56761/lib/node_modules/create-steedos-app/node_modules/@geek/spinner/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename /Users/yinlianghui/.npm/_npx/56761/lib/node_modules/create-steedos-app/node_modules/@geek/spinner/node_modules/chalk/source/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/yinlianghui/.npm/_npx/56761/lib/node_modules/create-steedos-app/node_modules/@geek/spinner/node_modules/chalk/package.json.