Comments (15)
Could you try downgrading Node to 9.x.x? We had seen bugs last week with Node 10.0.0 that they were investigating.
from typed-rest-client.
I've tried 9.11.1 and 8.11.1 (the receommended version). I still get the same build errors. Are there any other librariies that I need to install locally?
from typed-rest-client.
It should be fully self contained, I assume you ran npm install? Is the code accessible in a repo somewhere? I can take a look.
from typed-rest-client.
Here's the link to the source:
https://1drv.ms/u/s!AhG37UfEsI26hMsS8wy6NmYx2DsVQQ
from typed-rest-client.
I pulled the code and ran:
npm install
npm run build
And it seems to have worked fine.
What steps are you following? Perhaps try to delete the package-lock.json and build again?
from typed-rest-client.
Umm I commented out the code that was giving the errors. Place this code in login.service.ts:
`
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import * as hm from 'typed-rest-client/Handlers';
import * as httpm from 'typed-rest-client/HttpClient';
@Injectable()
export class LoginService {
constructor(private http: HttpClient) {}
async test() {
var username = "";
var password = "";
var workstation = "";
var domain = "";
var url = "";
const ntlmHandler: hm.NtlmCredentialHandler = new hm.NtlmCredentialHandler(username, password, workstation, domain);
const httpClient: httpm.HttpClient = new httpm.HttpClient('vsts-node-api', [ntlmHandler]);
const response: httpm.HttpClientResponse = await httpClient.get(url);
console.log("response code: " + response.message.statusCode);
}
}
`
from typed-rest-client.
I think this is related to WebPack, see here. Will keep digging.
from typed-rest-client.
Any ETA on how to get this to work?
from typed-rest-client.
Will take another look today.
from typed-rest-client.
It looks like issues with Angular 6, see here for more context. I don't think this is an issue with the library but a dependency issue with Angular that you are seeing manifested in a reference to this lib. Perhaps follow the directions from that thread or try a different version of Angular.
from typed-rest-client.
This is the answer I got from the Angular dev team:
https://github.com/angular/angular-cli/issues/10844#event-1624981900
Can something be done that this library works in the browser?
from typed-rest-client.
Let me investigate this, I think we would like the library to be usable in the browser as long as it's not too cumbersome to do so.
Adding @bryanmacfarlane for visibility.
Will look into this today.
from typed-rest-client.
Like the library but certainly would like it to be more browser/client friendly:)
from typed-rest-client.
I think Browserify might be the solution here - you could try:
- Create a nodejs file that you want to run in the browser
- Include whatever modules you need with 'require(typed-rest-client/abcModule)'
- Run browserify on that file
- Include the resulting bundle as a script in your html file.
from typed-rest-client.
Closing this due to inactivity, please reopen if it's still an issue.
from typed-rest-client.
Related Issues (20)
- decompressGzippedContent : missing return when rejecting promise HOT 2
- How to reuse cookie in HttpClient HOT 1
- Sending body with delete request HOT 3
- Underscore 1.12.1 being used shows vulnerability https://npmjs.com/advisories/1674
- Possible regression in proxy variable processing HOT 4
- SyntaxError: Invalid regular expression: invalid group specifier name HOT 3
- Confusing deprecation: "1.8.5 contains changes that are not compatible with Node 6" HOT 3
- Update Azure pipeline and remove GitHub action HOT 2
- Authentication header is set on redirect request HOT 1
- ETIMEDOUT for certain calls on Node 16 HOT 5
- Performance issues with readBody in HttpClient.ts HOT 3
- error from zlib not handled properly in decompressGzippedContent() HOT 4
- This repo is missing important files
- Unable to read error message from response header HOT 3
- uncaught reference error: the process does not define in browser HOT 11
- not working with react with next js , HOT 3
- Discussion: use with fetch API HOT 5
- Incorrect header check error while decompressing a response HOT 2
- Chrome 113 breaks typed-rest-client HOT 3
- Please tag released versions HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typed-rest-client.