Feathers-vuex: "Uncaught TypeError: service is not a function"

Created on 21 Sep 2019  路  6Comments  路  Source: feathersjs-ecosystem/feathers-vuex

I am trying to use latest FeathersJS (4.3.2) with prerelease Feathers-Vuex 2.0.0-pre.75 (solution to issue #247).

I am getting error as pictured.
"Uncaught TypeError: service is not a function"

Question: feathers-vuex newer version no longer returning service as function? Maybe documentation/tutorial how to use Feathers-Vuex need to change?

My vuex store index.js code as in picture and my feathersClient follow tutorial

https://feathers-vuex.feathers-plus.com/api-overview.html#features

``
import feathers from "@feathersjs/feathers";
import socketio from "@feathersjs/socketio-client";
import auth from "@feathersjs/authentication-client";
import io from "socket.io-client";

const socket = io("http://localhost:3030", { transports: ["websocket"] });

const feathersClient = feathers()
.configure(socketio(socket))
.configure(auth({ storage: window.localStorage }));

export default feathersClient;``

image

Most helpful comment

I'm sorry that the Feathers release has caused some extra time spent on the upgrade. It has not been possible for me to manage all of my other responsibilities along with keeping ahead of the recent changes. This is a rare thing, but I appreciate your patience. I've added a note to the Readme. I'm going to close this.

All 6 comments

Getting the same error with Feathers-Vuex 2.0.0-pre.77.

index.js?4360:12 Uncaught TypeError: service is not a function
    at eval (index.js?4360:12)
    at Module../src/store/index.js (app.js:8916)
    at __webpack_require__ (app.js:770)
    at fn (app.js:130)
    at eval (app.js?9992:1)
    at Module../.quasar/app.js (app.js:921)
    at __webpack_require__ (app.js:770)
    at fn (app.js:130)
    at eval (client-entry.js:19)
    at Module../.quasar/client-entry.js (app.js:933)

Going through the 2.x update

The way the services are added in 2.x has changed, you should look at https://github.com/feathers-plus/feathers-vuex/pull/216 and follow the instructions.

OMG! After spending few hours scratching head got the upgrade to 2.x working. Phew!!!

@J3m5 Yes followed #216 and then encountered #238.

For Quasar app transpileDependencies can be updated in quasar.conf.js under build as

transpileDependencies: ['feathers-vuex'],

I'm sorry that the Feathers release has caused some extra time spent on the upgrade. It has not been possible for me to manage all of my other responsibilities along with keeping ahead of the recent changes. This is a rare thing, but I appreciate your patience. I've added a note to the Readme. I'm going to close this.

@marshallswain Thank you very much for such a useful library and your continued effort.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juancampuzano picture juancampuzano  路  4Comments

nakedgun picture nakedgun  路  8Comments

RubyRubenstahl picture RubyRubenstahl  路  3Comments

daenuprobst picture daenuprobst  路  5Comments

coderinblack08 picture coderinblack08  路  7Comments