Giter VIP home page Giter VIP logo

Comments (12)

patrickpereira avatar patrickpereira commented on September 25, 2024

If I import it like this, it works: const reactive = require('feathers-reactive');

I'm not sure why the above is the case, as all other feathers plugins I can use the import statement.

from feathers-reactive.

eddyystop avatar eddyystop commented on September 25, 2024

Could this be your issue? webpack/webpack#1794

from feathers-reactive.

daffl avatar daffl commented on September 25, 2024

I think @eddyystop got it. It will work with

 import reactive from 'feathers-reactive';
// or
const reactive = require('feathers-reactive');

from feathers-reactive.

patrickpereira avatar patrickpereira commented on September 25, 2024

The first gives me this error:
ERROR in /Users/patrickpereira/lazy/backend/src/app/shared/api/api.service.ts (11,22): Cannot find module 'feathers-reactive'.)

Second one is working, so I'm just using that.

from feathers-reactive.

daffl avatar daffl commented on September 25, 2024

That seems odd. I'll give it another try.

from feathers-reactive.

j2L4e avatar j2L4e commented on September 25, 2024

@patrickpereira create a .d.ts file containing declare module 'feathers-reactive'

from feathers-reactive.

eddyystop avatar eddyystop commented on September 25, 2024

Watch out @j2L4e , you are becoming our TS guy !

from feathers-reactive.

daffl avatar daffl commented on September 25, 2024

This TypeScript files has been updated in the recently released v0.5.0 so I am going to close this.

from feathers-reactive.

daffl avatar daffl commented on September 25, 2024

Still seems to be happening. @j2L4e If you get a chance, could you check if latest works with https://github.com/feathersjs/feathers-chat-angular ?

from feathers-reactive.

oscarhull avatar oscarhull commented on September 25, 2024

Still failing, steps to reproduce:

  1. Download https://github.com/feathersjs/feathers-chat-angular
  2. Update feathers-reactive version to 0.5.0 in package.json
  3. run: npm install
  4. run: ng serve

** Note ** I tried this but didn't work: Try adding declare module 'feathers-reactive' to node_modules/feathers-reactive/index.d.ts

Result:

ERROR in ./src/app/services/feathers.service.ts
Module not found: Error: Can't resolve 'feathers-reactive' in '/Users/ohull/Downloads/feathers-chat-angular-master/src/app/services'
 @ ./src/app/services/feathers.service.ts 12:0-48
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

from feathers-reactive.

patrickpereira avatar patrickpereira commented on September 25, 2024

I made it work like this in Angular 4:

import * as reactive from 'feathers-reactive/lib';

from feathers-reactive.

j2L4e avatar j2L4e commented on September 25, 2024

Reproduced.

However I started a new angular (cli version 1.3.2) project with feathers-reactive 0.5.0 yesterday and it works just fine. I'll investigate.

from feathers-reactive.

Related Issues (20)

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.