Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build my project #7227

Closed
ghost opened this issue Aug 1, 2017 · 8 comments
Closed

Unable to build my project #7227

ghost opened this issue Aug 1, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Aug 1, 2017

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.2.4
node: 6.10.3
os: win32 x64
@angular/animations: 4.3.2
@angular/cdk: 2.0.0-beta.8
@angular/cli: 1.2.4
@angular/common: 4.3.2
@angular/compiler: 4.3.2
@angular/compiler-cli: 4.3.2
@angular/core: 4.3.2
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.3.2
@angular/http: 4.3.2
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.3.2
@angular/platform-browser-dynamic: 4.3.2
@angular/router: 4.3.2
@angular/language-service: 4.3.2

Repro steps.

I don't know how to reproduce it, it may be project related. You can find the project at This repository if you want to try.

It happens when I run npm run build-i18n, which launches ng build --output-path=dist/en --aot --prod --bh /en/ --i18n-file=src/i18n/messages.en.xlf --i18n-format=xlf --locale=en (and the french version). I haven't been able to find an answer online.

The log given by the failure.

Error: ENOENT: no such file or directory, mkdir 'D:\mtrichard\angularApp\dist\en'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:923:18)
    at licensePlugin.write (D:\mtrichard\angularApp\node_modules\license-webpack-plugin\index.js:176:10)
    at licensePlugin.<anonymous> (D:\mtrichard\angularApp\node_modules\license-webpack-plugin\index.js:199:12)
    at Compiler.applyPlugins (D:\mtrichard\angularApp\node_modules\tapable\lib\Tapable.js:61:14)
    at onCompiled (D:\mtrichard\angularApp\node_modules\webpack\lib\Compiler.js:238:12)
    at D:\mtrichard\angularApp\node_modules\webpack\lib\Compiler.js:494:13
    at next (D:\mtrichard\angularApp\node_modules\tapable\lib\Tapable.js:184:11)
    at Compiler.<anonymous> (D:\mtrichard\angularApp\node_modules\webpack\lib\CachePlugin.js:62:5)
    at Compiler.applyPluginsAsyncSeries (D:\mtrichard\angularApp\node_modules\tapable\lib\Tapable.js:188:13)
    at D:\mtrichard\angularApp\node_modules\webpack\lib\Compiler.js:491:10
    at next (D:\mtrichard\angularApp\node_modules\tapable\lib\Tapable.js:184:11)
    at Compilation.compilation.plugin (D:\mtrichard\angularApp\node_modules\@angular\cli\plugins\suppress-entry-chunks-webpack-plugin.js:35:17)
    at Compilation.applyPluginsAsyncSeries (D:\mtrichard\angularApp\node_modules\tapable\lib\Tapable.js:188:13)
    at self.applyPluginsAsync.err (D:\mtrichard\angularApp\node_modules\webpack\lib\Compilation.js:645:19)
    at next (D:\mtrichard\angularApp\node_modules\tapable\lib\Tapable.js:184:11)

Desired functionality.

Mention any other details that might be useful.

@smoke
Copy link
Contributor

smoke commented Aug 1, 2017

This happened to me also, it seems that from some version above the --output-path folder is not created with deep option.
I was able to workaround this by having a "pre" script that creates the folder.

In your case you should be able to use in package.json something like:

...
"scripts": {
  ...
  "prebuild-i18n": "mkdir -p dist"
  ...
}
...

Still I think this is a valid issue and makes sense for the folders to be created deeply.

@ghost
Copy link
Author

ghost commented Aug 1, 2017

Wow, just that ? I pulled my hair for 2 hours around this issue ...

The strange thing is that I published it this morning without any issue, and 4 hours later, it didn't work anymore.

Thank you for your help, and yes, I agree with you, this shouldn't happen ! I won't close it, and let them decide.

@ghost
Copy link
Author

ghost commented Aug 1, 2017

Thank to your comment, I discovered that it was due to a missing translation :

  <trans-unit id="signupDisclaimer" datatype="html">
    <source>
      <x id="START_BOLD_TEXT" ctype="x-b"/>FreeKek<x id="CLOSE_BOLD_TEXT" ctype="x-b"/> is a <x id="START_ITALIC_TEXT" ctype="x-i"/>closed community<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>. If you want to be part of it, you must <x id="START_ITALIC_TEXT" ctype="x-i"/>request an account<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>.
      <x id="LINE_BREAK" ctype="lb"/><x id="LINE_BREAK" ctype="lb"/>Once you have made your request, a <x id="START_ITALIC_TEXT" ctype="x-i"/>verified user<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/> will accept or reject it.
      <x id="LINE_BREAK" ctype="lb"/><x id="LINE_BREAK" ctype="lb"/>As long as your account isn&apos;t verified, <x id="START_ITALIC_TEXT" ctype="x-i"/>you are considered as a guest<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>. You won&apos;t be able to <x id="START_ITALIC_TEXT" ctype="x-i"/>post content, comment, like, flag<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>, or any of the things a user can do.
    </source>
    <target>
      <x id="START_BOLD_TEXT" ctype="x-b"/>FreeKek<x id="CLOSE_BOLD_TEXT" ctype="x-b"/> est une <x id="START_ITALIC_TEXT" ctype="x-i"/>communauté fermée<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>. Si tu veux la rejoindre, il faut <x id="START_ITALIC_TEXT" ctype="x-i"/>demander un compte<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>.
      <x id="LINE_BREAK" ctype="lb"/><x id="LINE_BREAK" ctype="lb"/>Une fois ta requête faite, un <x id="START_ITALIC_TEXT" ctype="x-i"/>utilisateur vérifié<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/> devra l'accepter ou la rejeter.
      <x id="LINE_BREAK" ctype="lb"/><x id="LINE_BREAK" ctype="lb"/>Tant que ton compte n'est pas vérifié, <x id="START_ITALIC_TEXT" ctype="x-i"/>tu es considéré en tant qu'invité<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>. Tu ne pourras pas <x id="START_ITALIC_TEXT" ctype="x-i"/>poster de contenu, commenter, aimer, signaler<x id="CLOSE_ITALIC_TEXT" ctype="x-i"/>, ou toute autre chose qu'un utilisateur peut faire.
    </target>
    <context-group purpose="location">
      <context context-type="sourcefile">app\components\account-request\account-request.component.ts</context>
      <context context-type="linenumber">2</context>
    </context-group>
  </trans-unit>

This trans-unit (rather complicated) had no target translation, and when I used your workaround, it told me the problem. Now it works again, as expected !

Maybe the issue is that the wrong error is brought back to the user ?

@smoke
Copy link
Contributor

smoke commented Aug 1, 2017

No idea what exactly is the problem, but now that you mention - I recall I also had a missing translation e.g. <trans-unit><source>Some source</source><!--no-target--></trans-unit> when I had issues with it - the same way @trichetriche described, so now there is a consistent way to reproduce this problem.

@catull
Copy link
Contributor

catull commented Aug 1, 2017

@trichetriche Now that the issue was solved, can you please close it ?

@ghost
Copy link
Author

ghost commented Aug 2, 2017

As I said, it's still a problem (wrong error brought to the user + missing target tags on generated translation files), so I won't close this issue, and wait for the angular-cli team to decide if it's worth to fix this issue.

@filipesilva
Copy link
Contributor

Duplicate of #7203

@filipesilva filipesilva marked this as a duplicate of #7203 Aug 2, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants