[asc.js] Error: Asconfig is not valid JSON: asconfig.json
alexsch01 opened this issue · 1 comments
alexsch01 commented
Bug description
Error: Asconfig is not valid JSON: asconfig.json
at ke (assemblyscript/dist/asc.js:22754:13927)
at async Object.Me (assemblyscript/dist/asc.js:22754:1741)
Steps to reproduce
-
mkdir TestProj
-
cd TestProj
-
npm install assemblyscript@0.27.29
-
script.mjs
import asc from 'assemblyscript/asc'
const tsString = 'ANYTHING that is not an empty string'
const cmd = 'module.ts --textFile module.wat --outFile module.wasm --bindings raw -O3 --runtime stub'
const config = {
readFile: () => tsString,
writeFile: () => null,
listFiles: () => null,
}
const options = cmd.split(' ')
asc.main(options, config)- node script.mjs
AssemblyScript version
0.27.29
alexsch01 commented
Not a bug, I think the documentation should clarify when using asc.main that you need to have a file called asconfig.json