{ AssertionError [ERR_ASSERTION]: Not supported: en - fixing strong-soap #215 on zeit/pkg builded executable
reajuria opened this issue · 4 comments
Description/Steps to reproduce
- Fix #215 strong-soap
- pkg . --out-dir '...any desired output directory after configure pkg'
- run executable file
Watch the exception
{ AssertionError [ERR_ASSERTION]: Not supported: en
at loadGlobalize (C:\snapshot\project-x\node_modules\strong-globalize\lib\globalize.js:408:5)
at Object.setDefaultLanguage (C:\snapshot\project-x\node_modules\strong-globalize\lib\globalize.js:66:5)
at Function.SetRootDir (C:\snapshot\project-x\node_modules\strong-globalize\lib\strong-globalize.js:64:23)
at Object. (C:\snapshot\project-x\node_modules\strong-soap\src\globalize.js:6:4)
at Module._compile (internal/modules/cjs/loader.js:700:30)
at Module._compile (pkg/prelude/bootstrap.js:1261:32)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
at Module.load (internal/modules/cjs/loader.js:610:32)
at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
at Function.Module._load (internal/modules/cjs/loader.js:541:3)
at Module.require (internal/modules/cjs/loader.js:648:17)
at Module.require (pkg/prelude/bootstrap.js:1159:31)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (C:\snapshot\project-x\node_modules\strong-soap\src\security\WSSecurityCert.js:3:9)
at Module._compile (internal/modules/cjs/loader.js:700:30)
at Module._compile (pkg/prelude/bootstrap.js:1261:32)
generatedMessage: false,
name: 'AssertionError [ERR_ASSERTION]',
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '==' }
pkg/prelude/bootstrap.js:1178
throw error;
^AssertionError [ERR_ASSERTION]: Not supported: en
at loadGlobalize (C:\snapshot\project-x\node_modules\strong-globalize\lib\globalize.js:408:5)
at Object.setDefaultLanguage (C:\snapshot\project-x\node_modules\strong-globalize\lib\globalize.js:66:5)
at Function.SetRootDir (C:\snapshot\project-x\node_modules\strong-globalize\lib\strong-globalize.js:64:23)
at Object. (C:\snapshot\project-x\node_modules\strong-soap\src\globalize.js:6:4)
at Module._compile (internal/modules/cjs/loader.js:700:30)
at Module._compile (pkg/prelude/bootstrap.js:1261:32)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:10)
at Module.load (internal/modules/cjs/loader.js:610:32)
at tryModuleLoad (internal/modules/cjs/loader.js:549:12)
at Function.Module._load (internal/modules/cjs/loader.js:541:3)
at Module.require (internal/modules/cjs/loader.js:648:17)
at Module.require (pkg/prelude/bootstrap.js:1159:31)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (C:\snapshot\project-x\node_modules\strong-soap\src\security\ClientSSLSecurity.js:3:9)
at Module._compile (internal/modules/cjs/loader.js:700:30)
at Module._compile (pkg/prelude/bootstrap.js:1261:32)
Expected result
Execution without issues
Additional information
Related to #215 strong-soap
Based on https://docs.npmjs.com/files/package.json#files:
Omitting the field will make it default to ["*"], which means it will include all files.
So zeit/pkg
does not have the same convention as npm
?
This article provided little information on what this error is or what could be a possible solution. This error has halted development for myself.
I am not asking for the answer just some more details regarding the issue.
Thanks
zeit/pkg is a bundler to build a single executable without sources from a nodejs package/project. I had a project which depends on strong-globalize.
When strong-globalize package was included in the execution fails (zeit/pkg runs fine, but execution of bundled file will generate the exception described previously), I found that zeit/pkg won't include strong-globalize runtime files during compilation due to files property/field on package.json is missing.
add "node_modules/**/strong-globalize/cldr/*.json"
to asests when using zeit/pkg to resolve this issue