question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while importing the package in SystemJS

See original GitHub issue

I’m submitting a …

[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request

Current behavior I’m using SystemJS and when I import ng2-translate as it appears on the README (…/bundles) the app throws an error.

Expected/desired behavior Everything should be imported from the bundles folder, but finally I had to imported like that:

'ng2-translate': 'node_modules/ng2-translate/bundles/ng2-translate.umd.js'

Reproduction of the problem I don’t know if it is related with the problem, but setting up the configuration as it says the README, nothing works. No errors, but no results neither (trying to use i18n with the pipe option).

<h2 class="text-center">{{'LOGIN.TITLE' | translate}}</h2>

What is the motivation / use case for changing the behavior? Does not work for me as the README tells.

Please tell us about your environment:

  • ng2-translate version: 4.2.0

  • Angular version: 2.0.0-rc.X

  • Browser: Chrome 54.0.2840.99

  • Language: TypeScript 2.0.3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
SamVerschuerencommented, Dec 15, 2016

The easiest thing to debug that is looking in the network tab of the developer tools. Most of the time, this is due to the fact that those .json files aren’t being copied over to the dist directory.

0reactions
ocombecommented, May 8, 2018

Hello, I’m closing this issue because it’s too old. If you have a similar problem with recent version of the library, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SystemJS error when importing modules into AngularJS
SystemJS error when importing modules into AngularJS - Anonymous System.register calls can only be made by modules loaded by SystemJS.import.
Read more >
systemjs | Yarn - Package Manager
SystemJS. Gitter Backers on Open Collective Sponsors on Open Collective Downloads on JS Delivr ... Call fetch hook when retrieving external import maps....
Read more >
How to Dynamically Import JavaScript with Import Maps
Fortunately, there is a project called SystemJS that can use create import maps for cross-browser support and use a variety of package builds....
Read more >
JS Fix For "SyntaxError: Cannot Use Import Statement Outside ...
This is most likely triggered when a file tries to use both import and require module patterns, which isn't possible. You'll need to...
Read more >
systemjs - npm
Dynamic ES module loader. Latest version: 6.13.0, last published: 3 months ago. Start using systemjs in your project by running `npm i ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found