Skip to content

i18nfile: Path must be a string or a buffer #3625

Closed
@ghost

Description

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Windows 10

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

$ ng --version
angular-cli: local (v1.0.0-beta.23, branch: master)
node: 6.9.2
os: win32 x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

ng build --aot --locale zh --i18nFormat xtb --i18nFile "./src/i18n/messages.zh.xtb"

error:

$ ng build --aot --locale zh --i18nFormat xtb --i18nFile './src/i18n/messages.zh.xtb'
Hash: 81af1eecaeec3091ea3e
Time: 5732ms
chunk    {0} main.bundle.js, main.bundle.map (main) 9.52 kB {1} [initial] [rendered]
chunk    {1} vendor.bundle.js, vendor.bundle.map (vendor) 1.25 MB [initial] [rendered]
chunk    {2} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]

ERROR in path must be a string or Buffer

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './app/client.module.ngfactory' in 'C:\projects\Dev\src\client\src'
 @ ./src/main.ts 4:0-70
 @ multi main

ERROR in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
Module not found: TypeError: Cannot convert undefined or null to object
 @ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js 69:15-36 85:15-102
 @ ./~/@angular/core/src/linker.js
 @ ./~/@angular/core/src/core.js
 @ ./~/@angular/core/index.js
 @ ./src/main.ts
 @ multi main

If I omit i18nfile, it works fine.
So it seems it cannot find the file. I've tried all options, also tried using quotes, single quotes, double quotes, etc as per @tdesmet his previous suggestion. Tried [email protected] as well as 2.1.4 as suggested by @hansl before.
Also tried using full paths, and relative paths. About relative paths, the i18n folder is in /src/i18n; the app is in /src/app. Not sure if that makes a difference?

Metadata

Metadata

Assignees

Labels

needs: investigationRequires some digging to determine if action is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions