Repository navigation
Description
I'm submitting a ... (check one with "x")
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
The compiler fails with the following error:
ng-xi18n -p src/tsconfig-i18n.json
TypeError: Cannot read property 'toLowerCase' of null
at Extractor.serialize (.../node_modules/@angular/compiler-cli/src/extractor.js:44:32)
at .../node_modules/@angular/compiler-cli/src/extractor.js:32:33
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:393:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:508:3
Extraction failed
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Angular version: 4.0.3
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: TypeScript 2.2.2
-
Node (for AoT issues):
node --version= v6.10.2
Activity
wiwski commentedon Apr 21, 2017
Got the same error as well
ocombe commentedon Apr 24, 2017
Easy to workaround: you have to specify the format with
--i18nFormat(xlf, or xmb).I'll work on the fix right now though.
fix(compiler-cli): set default format to xlf for serialize
yuerdev commentedon May 8, 2017
oh,./node_modules/.bin/ng-xi18n --i18nFormat=xmb
and perfect
feat(compiler-cli): add i18n parameters to tsconfig
Safe0 commentedon May 16, 2017
It's working well for xmb but for xfl I have an unsupported format error. Am I missing something?
ocombe commentedon May 16, 2017
because it's "xlf", not "xfl"
Safe0 commentedon May 17, 2017
Wow, I'm so dumb... thanks!
dgroh commentedon Jun 22, 2017
Also having the same error:
after running
npm run i18n --i18nFormat=xlfI got:
trotyl commentedon Jun 23, 2017
@dgroh That way you're passing the
i18nFormatoption to npm itself, obvious npm doesn't know that. A--is needed for passing to the inner command. See npm-run-script for more information.sarat9 commentedon Jul 13, 2017
For Windows Users:
"./node_modules/.bin/ng-xi18n" --i18nFormat=xlf
If the tsconfig.json TypeScript configuration file is located somewhere other than in the root folder, you must identify the path to it with the -p option:
"./node_modules/.bin/ng-xi18n" --i18nFormat=xlf -p path\to\tsconfig.json
Also follow the quotes order.
ocombe commentedon Nov 3, 2017
I believe that this has been solved. Closing the issue. Let me know if that's not the case.
angular-automatic-lock-bot commentedon Sep 12, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.