nwjs .idl build errors on Windows.

225 views
Skip to first unread message

mike.k...@gmail.com

unread,
Dec 16, 2021, 8:51:40 PM12/16/21
to nw.js
Has anyone encountered this issue building nwjs on Windows?

 [894/60485] ACTION //content/nw/src/api:generated_api_types_schema_generator(//build/toolchain/win:win_clang_x86)
FAILED: gen/content/nw/src/api/nw_shortcut.cc gen/content/nw/src/api/nw_shortcut.h
C:/Users/chro/Chromium/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python3/bin/python3.exe ../../tools/json_schema_compiler/compiler.py ../../content/nw/src/api/nw_shortcut.idl --root=../../ --destdir=gen --namespace=extensions::nwapi::%(namespace)s --generator=cpp --include-rules=extensions/common/api:extensions::nwapi::%(namespace)s

../../content\nw\src\api\nw_shortcut.idl(5) : Unexpected EoF reached after

^
'canning error. Illegal character '
Traceback (most recent call last):
  File "../../tools/json_schema_compiler/compiler.py", line 211, in <module>
    result = GenerateSchema(opts.generator, file_paths, opts.root, opts.destdir,
  File "../../tools/json_schema_compiler/compiler.py", line 98, in GenerateSchema
    type_generator = CppTypeGenerator(api_model,
  File "C:\Users\chro\nwjs\src\tools\json_schema_compiler\cpp_type_generator.py", line 35, in __init__
    self._default_namespace = list(model.namespaces.values())[0]
IndexError: list index out of range

Roger Wang

unread,
Dec 16, 2021, 9:01:51 PM12/16/21
to mike.k...@gmail.com, nw.js
Is your Python 2.x? Should upgrade to v3.

--
You received this message because you are subscribed to the Google Groups "nw.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nwjs-general...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nwjs-general/fc405a46-1367-4f73-9ede-ac19ff6bb902n%40googlegroups.com.

meraj....@gmail.com

unread,
Mar 22, 2022, 9:32:30 AM3/22/22
to nw.js
Hi Mike,

I am also seeing same error? did you figure it out, if yes please give some suggestions to fix it.

Thanks,
Meraj

佩林聂

unread,
Jul 6, 2022, 7:48:59 AM7/6/22
to nw.js
I also encountered the same error, hope somebody can help! Thanks a lot!

Mike Kilburn

unread,
Jul 6, 2022, 9:22:25 AM7/6/22
to 佩林聂, nw.js
I ended up using dos2unix on many of the files in content\nw\src\api. Basically I would call dos2unix on the file that had the error then start build again, wait for next error then call dos2unix on that file, etc until build was done. 

佩林聂

unread,
Jul 7, 2022, 12:41:12 AM7/7/22
to nw.js
It works! Thank you so much!
Reply all
Reply to author
Forward
0 new messages