Giter Club home page Giter Club logo

cookies's People

Contributors

antonbarada avatar daniloff200 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cookies's Issues

Angular 6?

Hello, any idea when will this library support Angular 6? Thanks in advance!

Angular 7

Hi,

Is it possible to have support with angular 7 please?

Error message :
Package "@ngx-utils/cookies" has an incompatible peer dependency to "@angular/core" (requires "^5.0.0" (extended), would install "7.0.1").

Package "@ngx-utils/cookies" has an incompatible peer dependency to "rxjs"(requires "^5.5.6", would install "6.3.3").

Service Injection Issue for Angular SSR

R3InjectorError(AppServerModule)[ApplicationModule -> ApplicationRef -> ApplicationInitStatus -> InjectionToken Application Initializer -> [object Object] -> StartupService -> ConfigService -> StorageService -> t -> t -> t]:
NullInjectorError: No provider for t!

After following the official documentation, I got above mentioned error. Tried adding the service in providers also but no luck.

Possible issue with ES6 syntax (SyntaxError: Unexpected token export)

Hi there.

I'm finding some problems when I try to run my express server and I'm using the cookies module.

This is the error:

[universal-sandbox] node dist/server.js
/Users/.../Documents/Playground/universal-sandbox/node_modules/@ngx-utils/cookies/src/browser/index.js:1
(function (exports, require, module, __filename, __dirname) { export * from './browser-cookies.module';
                                                              ^^^^^^

SyntaxError: Unexpected token export
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:537:28)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/.../Documents/Playground/universal-sandbox/dist/server.js:1:20221)

And this is my config:

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
    
Angular CLI: 1.5.0
Node: 8.3.0
OS: darwin x64
Angular: 5.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.21
@angular-devkit/schematics: 0.0.37
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.7
typescript: 2.4.2
webpack-node-externals: 1.6.0
webpack: 3.8.1

I think it's a problem of ES6 syntax, but I am wondering if it has happened to more people and how did they solve it. Should I transpile the entire module with babel to commonjs target? Is there a way of configuring node so that it runs ES6 code?

Thanks!

Are the steps given in the guide complete?

I'm getting this error while serving the server code

ERROR { Error: StaticInjectorError[REQUEST]: StaticInjectorError(Platform: core)[REQUEST]: NullInjectorError: No provider for REQUEST!

I followed all the steps in the readme but still the issue.

Server config docs aren't clear

Hey, i'm trying to configure the service on the server-side and i don't understand the server.ts part.
Where do I import AppModuleNgFactory, template and LAZY_MODULE_MAP from?

ngx-utils does not work in angular-cli 9.1.0

ERROR in node_modules/@ngx-utils/cookies/src/cookies-options.service.d.ts:11:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

11 static ɵfac: i0.ɵɵFactoryDef;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@ngx-utils/cookies/src/cookies.service.d.ts:22:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

22 static ɵfac: i0.ɵɵFactoryDef;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@ngx-utils/cookies/src/browser/browser-cookies.service.d.ts:14:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

14 static ɵfac: i0.ɵɵFactoryDef;

Wrong load path on Ivy compiler

I have a module on npm that depends on @ngx-utils/cookies, and people are complaining that it raises an error on the new Ivy compiler.

This is the full error I get

ERROR in ./node_modules/angular-ab-tests/__ivy_ngcc__/fesm5/angular-ab-tests.js 464:41-57
"export 'CookiesService' (imported as 'CookiesService$1') was not found in '@ngx-utils/cookies'
ERROR in ./node_modules/angular-ab-tests/__ivy_ngcc__/fesm5/angular-ab-tests.js 466:227-243
"export 'CookiesService' (imported as 'CookiesService$1') was not found in '@ngx-utils/cookies'
ERROR in ./node_modules/angular-ab-tests/__ivy_ngcc__/fesm5/angular-ab-tests.js 472:38-54
"export 'CookiesService' (imported as 'CookiesService$1') was not found in '@ngx-utils/cookies'
ERROR in ./node_modules/@ngx-utils/cookies/__ivy_ngcc__/index.js
Module not found: Error: Can't resolve './src/cookies-options.service' in '[path-to-project]/project-sample/node_modules/@ngx-utils/cookies/__ivy_ngcc__'
ERROR in ./node_modules/@ngx-utils/cookies/__ivy_ngcc__/index.js
Module not found: Error: Can't resolve './src/cookies.service' in '[path-to-project]/project-sample/node_modules/@ngx-utils/cookies/__ivy_ngcc__'

I don't know how the content of the folder __ivy_ngcc__ is generated, but I see that there is an error in

/__ivy_ngcc__/index.js

The content of that file is

export * from './src/cookies.service';
export * from './src/cookies-options.service';

which fails because it tries to load things from a non existing folder src/ inside __ivy_ngcc__ itself.

Correcting it this way it works

export * from '../src/cookies.service';
export * from '../src/cookies-options.service';

I am a bit lost, is this caused by @nx-utils/cookies, or it's a problem with how I configured the Ivy compiler?

Thanks in advance for the help

Unexpected token import when running server.js

I've followed all steps of the guide, but I get the following error when running node server.js:

../node_modules/@ngx-utils/cookies/src/cookies-options.service.js:1
(function (exports, require, module, __filename, __dirname) { import { Inject, Injectable, InjectionToken, Injector } from '@angular/core';
                                                          ^^^^^^

SyntaxError: Unexpected token import

I've also added @ngx-utile/cookies umd file to scripts in the .angular-cli.json file, as follows, but it did not work:

"scripts": [
  "../node_modules/@ngx-utils/cookies/bundles/cookies.umd.js"
 ]

Am I missing something?

Abandoned?

Is this project abandoned?
I can't believe how insufficient the documentation of Angular Universal is, I want to solve to handle my auth cookies and I found nothing but this, which seems abandoned.

Error during build Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

Hey! :)
It look like the "@angular/compiler-cli": "9.0.0" is not compatible with the newest version. I am recieving the error:

`ERROR in node_modules/@ngx-utils/cookies/src/cookies-options.service.d.ts:11:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

11 static ɵfac: i0.ɵɵFactoryDef;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@ngx-utils/cookies/src/cookies.service.d.ts:22:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

22 static ɵfac: i0.ɵɵFactoryDef;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@ngx-utils/cookies/src/browser/browser-cookies.service.d.ts:14:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

14 static ɵfac: i0.ɵɵFactoryDef;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`

It's possible to upgrade to newest version?

Tests broken after using this service

After starting to use this library, my units tests broke. First I get:

NullInjectorError: No provider for CookiesService!

I've tried adding CookiesService, CookiesOptionsService to the providers, but then I get NullInjectorError: No provider for InjectionToken COOKIES_OPTIONS!, and I can't get pass that.

I've also tried adding BrowserCookiesModule to the imports, but still nothing. Any clues?

import { TestBed, inject } from '@angular/core/testing';

import { ListingsService } from './listings.service';
import { HttpClientModule } from '@angular/common/http';
import { BrowserCookiesModule } from '@ngx-utils/cookies/browser';
import { CookiesService, CookiesOptionsService } from '@ngx-utils/cookies';
import { InjectionToken } from '@angular/core';

describe('ListingsService', () => {
  beforeEach(() => {

    TestBed.configureTestingModule({
      providers: [ListingsService, CookiesService, CookiesOptionsService],
      imports: [
        HttpClientModule,
        BrowserCookiesModule
      ]
    });
  });

  it('should be created', inject([ListingsService], (service: ListingsService) => {
    expect(service).toBeTruthy();
  }));
});

Angular 5?

Will this library be updated to target Angular 5 at some point?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.