Error while importing the package in SystemJS
See original GitHub issueI’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:
- Created 7 years ago
- Comments:10
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 thedist
directory.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.