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.

How to import linq-es2015?

See original GitHub issue

in package.json “dependencies”: { … “linq-es2015”: “2.4.4”, …

in systemjs.config.js var map = { … ‘linq-es2015’: ‘node_modules/linq-es2015’ …

var packages = { … ‘linq-es2015’: { main: ‘index.js’, defaultExtension: ‘js’ } …

in gulpfile.js gulp.src(‘./node_modules/linq-es2015/*/.js’).pipe(gulp.dest(‘./wwwroot/node_modules/linq-es2015’));

then in xxx.ts file: import * as Enumerable from “linq-es2015”;

ngOnInit() { var count = Enumerable.asEnumerable([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) .Where(a => a % 2 == 1) .Count();

    alert(count);

but when run in chrome , Error: XHR error (404 Not Found) … Error loading http://localhost:5000/node_modules/linq-es2015/index.js as “linq-es2015” from http://localhost:5000/app/xxxx.js

can anyone help me? why error happied?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ENikScommented, Aug 16, 2016

Why don’t you use one of the provided examples?

To be used in chrome linq-es2015 has to be processed by browserify utility. There are sample projects here and here. Home page for the project has all the required info as well.

If you need already processed module look under latest releases. You will find regular as well as minified modules attached to the release.

0reactions
richerpcommented, Aug 22, 2016

@ENikS Thank you very much.I lost ‘linq-es2015’: { main: ‘dist/linq.js’, defaultExtension: ‘js’ }. It is working correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

linq-es2015 - npm
Start using linq-es2015 in your project by running `npm i linq-es2015`. ... import * as Enumerable from "linq-es2015";.
Read more >
linq-es2015 - npm Package Health Analysis - Snyk
Complete implementation of Language-Integrated Query (LINQ) (ECMAScript 2015 Language Specification) For more information about how to use this package see ...
Read more >
How to GroupBy on two keys with linq-es2015? - Stack Overflow
Short question: How to groupby on two keys by using linq-es2015 in an Angular app? One key works well, but I got no...
Read more >
LINQ | RunKit
Module has to be loaded by calling require or using import keyword: import {asEnumerable, Range} from "linq-es2015"; ​ Module exports following functions:.
Read more >
Learn ES2015 - Babel
See the ES2015 standard for full specification of the ECMAScript 2015 ... Don't require realizing an array, enabling lazy design patterns like LINQ....
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