Anyone have this error appear when trying to install the WYSIWYG editor Tiptap for Vuefity?
This is the error:
ERROR in ./node_modules/vuetify/src/styles/main.sass (./node_modules/css-loader/dist/cjs.js??ref--4-1!./node_modules/postcss-loader/src??ref--4-2!./node_modules/sass-loader/dist/cjs.js??ref--4-3!./node_modules/vuetify/src/styles/main.sass)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after " #content": expected "}", was "($material-light); "
on line 3 of node_modules/vuetify/src/styles/tools/_theme.sass
from line 6 of node_modules/vuetify/src/styles/tools/_index.sass
from line 3 of /home/fc-gui/node_modules/vuetify/src/styles/main.sass
>> #content($material-light); }
----^
And then this is my main Vue file:
/* eslint no-console: 0 */
import '#mdi/font/css/materialdesignicons.css'
import Vue from 'vue'
import VueRouter from 'vue-router'
import App from '../app.vue'
import Vuetify from 'vuetify'
import getShop from '../api/shops'
import customizationApi from '../api/customization'
import { routes } from '../router/routes'
import store from '../store/store'
import axios from 'axios'
import VueFriendlyIframe from 'vue-friendly-iframe';
import { TiptapVuetifyPlugin } from 'tiptap-vuetify'
Vue.use(VueFriendlyIframe)
Vue.use(Vuetify)
Vue.use(VueRouter)
Vue.use(TiptapVuetifyPlugin)
const router = new VueRouter({
routes
});
router.beforeEach((to, from, next) => {
if(to.name == null){
getShop.get(
data => {
if(data.setup) {
next({ name: 'emailCustomize'});
}
else {
next({ name: 'plans'})
}
});
}
else {
next();
}
});
document.addEventListener('DOMContentLoaded', () => {
const app = new Vue({
vuetify: new Vuetify(),
router,
store,
render: h => h(App)
}).$mount()
document.body.appendChild(app.$el)
})
And finally my package.json file
{
"name": "fresh-credit",
"private": true,
"dependencies": {
"#rails/actioncable": "^6.0.0-alpha",
"#rails/activestorage": "^6.0.0-alpha",
"#rails/ujs": "^6.0.0-alpha",
"#rails/webpacker": "^4.0.7",
"animate.css": "^3.7.2",
"axios": "^0.19.0",
"babel-preset-stage-2": "^6.24.1",
"chart.js": "^2.8.0",
"lodash": "^4.17.15",
"postcss-loader": "^3.0.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"tiptap-extensions": "^1.28.6",
"tiptap-vuetify": "^2.13.2",
"turbolinks": "^5.2.0",
"vue": "^2.6.10",
"vue-breadcrumbs": "^1.2.0",
"vue-chartist": "^2.2.1",
"vue-chartjs": "^3.4.2",
"vue-click-outside": "^1.0.7",
"vue-friendly-iframe": "^0.17.0",
"vue-loader": "^15.7.1",
"vue-router": "^3.1.3",
"vue-template-compiler": "^2.6.10",
"vuetify": "^2.0.18",
"vuex": "^3.1.2"
},
"version": "0.1.0",
"devDependencies": {
"#mdi/font": "^4.4.95",
"deepmerge": "^4.2.2",
"fibers": "^4.0.2",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"webpack-dev-server": "^3.8.0",
"webpack-merge": "^4.1.0"
}
}
Nothing seems to be working. I even took a look at those files mentioned in the error and it doesn't look like that's the source of the issue. But for completeness here is the file _theme.sass
#mixin theme ($component)
.theme--light.#{$component}
#content($material-light)
.theme--dark.#{$component}
#content($material-dark)
Throw this in your Webpack.config.js rules and specify the options based on the sass-loader version you are using
{
test: /\.s(c|a)ss$/,
use: [
'vue-style-loader',
'css-loader',
{
loader: 'sass-loader',
// Requires sass-loader#^7.0.0
options: {
implementation: require('sass'),
fiber: require('fibers'),
indentedSyntax: true // optional
},
// Requires sass-loader#^8.0.0
options: {
implementation: require('sass'),
sassOptions: {
fiber: require('fibers'),
indentedSyntax: true // optional
},
},
},
],
},
And ensure that you are using sass instead of node-sass in your package.json. from my experience I found that if you have had node-sass previously installed, you might want to delete node modules and re-run npm install
You might also want to install vue-style-loader and css-loader as i don't see them in your package.json
More information can be found in these links
https://github.com/vuetifyjs/vuetify/issues/7950
https://vuetifyjs.com/en/introduction/frequently-asked-questions/
https://github.com/vuetifyjs/vuetify/issues/7323
Related
I'm implementing fullcalendar in my project that has Laravel 9 and Vue 3.
I think it is not loading the css as the on-screen calendar is looking like this: Calendar Image.
I have already made several settings. Even the Vue part is working because the calendar is working.
Below in the images are the settings that are today.
package.json
{
"private": true,
"scripts": {
"dev": "vite --host",
"build": "vite build"
},
"devDependencies": {
"axios": "^1.1.2",
"bootstrap": "^4.6.2",
"laravel-vite-plugin": "^0.6.0",
"lodash": "^4.17.19",
"postcss": "^8.1.14",
"sass": "^1.32.11",
"script-loader": "^0.7.2",
"vite": "^3.0.0"
},
"dependencies": {
"#fullcalendar/core": "^5.11.3",
"#fullcalendar/daygrid": "^5.11.3",
"#fullcalendar/interaction": "^5.11.3",
"#fullcalendar/list": "^5.11.3",
"#fullcalendar/timegrid": "^5.11.3",
"#fullcalendar/vue3": "^5.11.2",
"#popperjs/core": "^2.11.6",
"#vitejs/plugin-vue": "^3.1.2",
"laravel-echo": "^1.9.0",
"socket.io-client": "^2.3.0",
"vue": "^3.2.41",
"vue-toastification": "^2.0.0-rc.5"
}
}
vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '#vitejs/plugin-vue';
import fs from 'fs';
const host = 'site.com.br';
export default defineConfig({
plugins: [
laravel({
input: ['resources/sass/app.scss', 'resources/js/app.js'],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
}
}
})
],
server: {
host,
hmr: { host },
https: {
key: fs.readFileSync('C:\\laragon\\etc\\ssl\\privada25296.key'),
cert: fs.readFileSync('C:\\laragon\\etc\\ssl\\certificado25296.crt'),
},
},
});
index.vue
<script>
import { useToast } from "vue-toastification";
import '#fullcalendar/core/vdom' // solves problem with Vite
import FullCalendar from '#fullcalendar/vue3'
import dayGridPlugin from '#fullcalendar/daygrid'
import timeGridPlugin from '#fullcalendar/timegrid'
import interactionPlugin from '#fullcalendar/interaction'
import { INITIAL_EVENTS, createEventId } from './event-utils'
export default {
components: {
FullCalendar // make the <FullCalendar> tag available
},
data() {
return {
calendarOptions: {
plugins: [ dayGridPlugin, timeGridPlugin, interactionPlugin ],
initialView: 'dayGridMonth',
initialEvents: INITIAL_EVENTS, // alternatively, use the `events` setting to fetch from a feed
}
}
},
mounted() {
const toast = useToast();
this.loadUserCustomers();
Echo.channel('agendamentos_database_user_customer_created')
.listen('UserCustomerCreated', (e) => {
toast.success('Novo cliente vinculado!')
});
},
methods: {
loadUserCustomers() {
axios.get('/api/calendar')
.then(response => {
console.log( response.data.data );
//this.userCustomers = response.data
})
.catch(response => {
console.log('Erro')
})
}
},
}
In the fullcalendar documentation, the following is mentioned about CSS.
CSS: All of FullCalendar’s CSS will be automatically loaded as long as your build system is able to process .css file imports. See Initializing with an ES6 Build System for more information on configuring your build system. https://fullcalendar.io/docs/vue#:~:text=ticket%20%23152.-,CSS,-All%20of%20FullCalendar%E2%80%99s
When I access link about ES6 Build System, it is described that I need to use webpack, and in the Laravel application, vite is used.
Can anyone help me with this problem please?
I solved it by loading allocate the size of the calendar
hope this solve your problem and I did it with the cdn
calendar.render();
calendar.setOption('height', 700);
It's 3 days i am on this problem of E2E tests on my GraphQL application with NestJS + Apollo / Express.
When I am running my app with serverless offline or directly with my main file, it's working perfectly. I have my graph and all things I need :)
But, when I am running E2E tests with Jest, I received an error from the await app.init() inside the beforeEach.
After playing with the package.json and dependencies, the error throwed is TypeError: (0 , schema_1.makeExecutableSchema) is not a function.
Someone have any idea please ? I am totally blocked ... :(
FAIL src/__tests/graphql/common.e2e-spec.ts
GraphQL - CommonModule (e2e)
Query - Test
✕ should return the test query with typename TestSuccess (code: 200) (385 ms)
● GraphQL - CommonModule (e2e) › Query - Test › should return the test query with typename TestSuccess (code: 200)
TypeError: (0 , schema_1.makeExecutableSchema) is not a function
15 | app = moduleFixture.createNestApplication();
16 | app.useGlobalPipes(new ValidationPipe());
> 17 | await app.init();
| ^
18 |
19 | request = superRequest(app.getHttpServer());
20 | });
at GraphQLFactory.mergeWithSchema (node_modules/#nestjs/graphql/dist/graphql.factory.js:30:72)
at ApolloDriver.start (node_modules/#nestjs/apollo/dist/drivers/apollo.driver.js:19:25)
at GraphQLModule.onModuleInit (node_modules/#nestjs/graphql/dist/graphql.module.js:103:9)
at Object.callModuleInitHook (node_modules/#nestjs/core/hooks/on-module-init.hook.js:51:9)
at Proxy.callInitHook (node_modules/#nestjs/core/nest-application-context.js:179:13)
at Proxy.init (node_modules/#nestjs/core/nest-application.js:96:9)
at Object.<anonymous> (src/__tests/graphql/common.e2e-spec.ts:17:5)
package.json
"dependencies": {
"#nestjs/apollo": "^10.0.4",
"#nestjs/common": "^8.3.1",
"#nestjs/core": "^8.3.1",
"#nestjs/graphql": "^10.0.4",
"#nestjs/jwt": "^8.0.0",
"#nestjs/passport": "^8.2.1",
"#nestjs/platform-express": "^8.3.1",
"#prisma/client": "^3.9.2",
"#vendia/serverless-express": "^4.5.3",
"apollo-server-core": "^3.6.3",
"apollo-server-express": "^3.6.3",
"apollo-server-plugin-base": "^3.5.1",
"aws-lambda": "^1.0.7",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"dotenv": "^16.0.0",
"env-var": "^7.1.1",
"express": "^4.17.1",
"graphql": "^16.3.0",
"graphql-query-complexity": "^0.11.0",
"nestjs-pino": "^2.5.0",
"passport": "^0.5.2",
"passport-jwt": "^4.0.0",
"pg": "^8.7.3",
"pino-http": "^6.6.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.5.3"
},
"devDependencies": {
"#faker-js/faker": "^6.0.0-alpha.5",
"#nestjs/cli": "^8.2.0",
"#nestjs/schematics": "^8.0.0",
"#nestjs/testing": "^8.0.0",
"#serverless/typescript": "^3.2.0",
"#types/aws-lambda": "^8.10.92",
"#types/bcryptjs": "^2.4.2",
"#types/express": "^4.17.13",
"#types/jest": "27.4.0",
"#types/node": "^16.0.0",
"#types/passport-local": "^1.0.34",
"#types/supertest": "^2.0.11",
"#typescript-eslint/eslint-plugin": "^5.0.0",
"#typescript-eslint/parser": "^5.0.0",
"apollo-server-testing": "^2.25.3",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.5.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"prisma": "^3.9.2",
"prisma-nestjs-graphql": "^14.6.1",
"serverless": "^3.2.1",
"serverless-offline": "^8.4.0",
"serverless-plugin-optimize": "^4.2.1-rc.1",
"serverless-plugin-warmup": "^7.0.2",
"source-map-support": "^0.5.21",
"supertest": "^6.2.2",
"ts-jest": "^27.1.3",
"ts-loader": "^9.2.3",
"ts-morph": "^13.0.3",
"ts-node": "^10.5.0",
"tsc-alias": "^1.5.0",
"tsconfig-paths": "^3.12.0",
"typescript": "^4.5.5",
"webpack": "^5.0.0"
}
jest.config.ts
module.exports = {
moduleFileExtensions: ['js', 'json', 'ts'],
testEnvironment: 'node',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
testRegex: '.(spec|e2e-spec).ts$',
moduleNameMapper: {
'^#features/(.*)': '<rootDir>/src/features/$1',
'^#tests/(.*)': '<rootDir>/src/__tests/$1',
'^#graphql': '<rootDir>/src/#graphql/generated',
'^#types': '<rootDir>/src/#types',
'^#utils': '<rootDir>/src/utils',
'^#config': '<rootDir>/src/config',
},
testPathIgnorePatterns: [
'<rootDir>/dist/',
'<rootDir>/prisma/',
'<rootDir>/bin/',
'<rootDir>/node_modules/',
'<rootDir>/.github/',
],
};
graphql.e2e-spec.ts
import { GraphQLModule } from '#features/graphql/graphql.module';
import { INestApplication, ValidationPipe } from '#nestjs/common';
import { Test, TestingModule } from '#nestjs/testing';
import superRequest, { SuperTest, Test as TestItem } from 'supertest';
describe('GraphQL - CommonModule (e2e)', () => {
let app: INestApplication;
let request: SuperTest<TestItem>;
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [GraphQLModule],
}).compile();
app = moduleFixture.createNestApplication();
app.useGlobalPipes(new ValidationPipe());
await app.init();
request = superRequest(app.getHttpServer());
});
describe('Query - Test', () => {
it('should return the test query with typename TestSuccess (code: 200)', async () => {
return request
.post('/graphql')
.send({
query: `
query {
test {
__typename
}
}`,
})
.then((res) => {
expect(res.status).toBe(200);
expect(res.body.data.test.__typename).toBe('TestSuccess');
});
});
});
});
graphql.module.ts
import { config } from '#config';
import { AppService } from '#features/app.service';
import { GraphQLAuthModule } from '#features/graphql/auth/auth.module';
import { CommonModule } from '#features/graphql/common/common.module';
import { UserModule } from '#features/graphql/user/user.module';
import { GraphQLComplexityPlugin } from '#features/graphql/_plugins';
import { ApolloDriver, ApolloDriverConfig } from '#nestjs/apollo';
import { Module } from '#nestjs/common';
import { GraphQLModule as NESTJSGraphQLModule } from '#nestjs/graphql';
import { join } from 'path';
#Module({
imports: [
GraphQLAuthModule,
NESTJSGraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: join(process.cwd(), 'src/#graphql/schema.gql'),
sortSchema: true,
debug: config.graphql.isDebugEnabled,
introspection: true,
playground: config.graphql.isPlaygroundEnabled
? {
settings: { 'schema.polling.enable': false },
}
: false,
}),
UserModule,
CommonModule,
],
providers: [AppService, GraphQLComplexityPlugin],
})
export class GraphQLModule {
constructor(private readonly appService: AppService) {
if (!this.appService.checkEnv()) process.exit();
}
}
After many hours of intense programming ...
I finally found the problem.
Be careful if you use some "alias" for imports, because it can overwrite some of the packages used.
Here, i use the #graphql alias, and it breaks all my tests.
When I remove it, the problem disappear.
moduleNameMapper: {
'^#features/(.*)': '<rootDir>/src/features/$1',
'^#tests/(.*)': '<rootDir>/__tests/$1',
'^#utils': '<rootDir>/src/utils',
'^#config': '<rootDir>/src/config',
'^#types': '<rootDir>/src/#types',
'^#graphql': '<rootDir>/src/#graphql/generated', // to remove
},
to
moduleNameMapper: {
'^#features/(.*)': '<rootDir>/src/features/$1',
'^#tests/(.*)': '<rootDir>/__tests/$1',
'^#utils': '<rootDir>/src/utils',
'^#config': '<rootDir>/src/config',
'^#types': '<rootDir>/src/#types',
},
I'm using Laravel 5.8
I'm working on a SPA with VueJs,
Problem with some dependency
here is the error while open some page
My package.json dependency is
"dependencies": {
"#riophae/vue-treeselect": "^0.2.0",
"axios": "^0.18",
"buefy": "^0.7.8",
"bulma": "^0.7.5",
"vee-validate": "^2.2.11",
"vue": "^2.5.17",
"vue-awesome-swiper": "^3.1.3",
"vue-router": "^3.1.3"
}
My package.json devDependency is
devDependencies:
"browser-sync": "^2.26.7",
"cross-env": "^5.2.0",
"laravel-mix": "^4.0.7",
"sass": "^1.22.7",
"sass-loader": "7.*",
"vue-template-compiler": "^2.6.10"
I guess some issue with these vue-treeselect and vue-awesome-swiper some time it is working fine but some time show error
My webpack.mix.js
const mix = require('laravel-mix');
mix.browserSync({
proxy: 'localhost:8000'
})
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
mix.webpackConfig({
resolve: {
alias: {
'#': path.resolve(__dirname, 'resources'),
},
},
output: {
publicPath: '/',
chunkFilename: 'js/[name].[chunkhash].js',
},
});
Here is how i import vue-swiper
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
Import vue-treeselect
import Treeselect from '#riophae/vue-treeselect'
import '#riophae/vue-treeselect/dist/vue-treeselect.css'
Try replacing:
'#': path.resolve(__dirname, 'resources'),
With:
'~': path.resolve(__dirname, 'resources/js'),
And Update:
import Treeselect from '#riophae/vue-treeselect'
With:
import { Treeselect } from '#riophae/vue-treeselect'
Laravel 5.6.21
NPM 6.1.0
Node 10.5.0
Webpack 3.12.0
My question is how to properly configure laravel-mix, webpack and babel to successfully lazy-load vue components using the method described here: Lazying Loading Routes
More specifically, using stage-2 (es2018 ?) syntax as follows:
const Foo = () => import('./Foo.vue')
When trying to compile using laravel-mix all statements resembling the above syntax generate an error (example):
Syntax Error: Unexpected token (1:24)
1 | const Dashboard = () => import("Pages/Account/Dashboard.vue");
| ^
I believe laravel-mix uses Babel to transpile and read that Babel needs 'syntax-dynamic-import' so I created a .bablerc file with the following contents:
{
"plugins": [
"syntax-dynamic-import"
]
}
Since the bable config file didn't resolve the issue, I also tried an eslint configuration file with the following contents:
module.exports = {
plugins: ["vue"], // enable vue plugin
extends: ["plugin:vue/recommended", "prettier"], // activate vue related rules
parserOptions: {
"parser": "babel-eslint",
"ecmaVersion": 7, //also tried 8
"sourceType": "module",
"ecmaFeatures": {
"globalReturn": false,
"impliedStrict": false,
"jsx": false,
"experimentalObjectRestSpread": false,
"allowImportExportEverywhere": false
}
}
};
Finally, a copy of the dependencies in package.json are:
"devDependencies": {
"#vue/test-utils": "^1.0.0-beta.24",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-loader": "^7.1.5",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-imports": "^1.5.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babel-preset-vue-app": "^2.0.0",
"cross-env": "^5.2.0",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-html": "^4.0.1",
"eslint-plugin-vue": "^4.5.0",
"expect": "^22.0.3",
"jsdom": "^11.5.1",
"jsdom-global": "^3.0.2",
"laravel-mix": "^2.1.14",
"less": "^3.5.3",
"less-loader": "^4.1.0",
"mocha": "^4.0.1",
"mocha-webpack": "^1.0.1",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"vue-loader": "^13.7.2",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.13",
"vue-test-utils": "^1.0.0-beta.8",
"webpack": "^3.12.0",
"webpack-auto-inject-version": "^1.1.0"
},
Any help regarding resolving this would be greatly appreciated.
I have been using with following in .eslintrc.json.
"extends": [
"eslint:recommended",
"plugin:vue/recommended"
],
"plugins": [
"vue"
],
"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "babel-eslint",
"ecmaVersion": 8,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
Also check your dynamic import function's path const Dashboard = () => import("Pages/Account/Dashboard.vue");. I thinks it should be a relative path something like const Dashboard = () => import("./Pages/Account/Dashboard.vue");
The problem is in the scss splitting in Vue and using mix.scss() both. Laravel mix when having both creates a css file with manifest js file content in it. which is definitely a bug. which the community mentions a bug from Webpack and will be resolved in webpack 5. But If you use only code splitting in Vue and have the default app.scss file imported to main Vue component like this(not in scope), so each other component will get the styling properly
// resources/js/components/app.vue
<template>
<!-- Main Vue Component -->
</template>
<script>
// Main Script
</script>
<style lang="scss">
#import '~#/sass/app.scss';
</style>
and the webpack.mix.js file will have no mix.scss function to run only a single app.js file. here is my file.
// webpack.mix.js
const mix = require('laravel-mix')
mix.babelConfig({
plugins: ['#babel/plugin-syntax-dynamic-import'] // important to install -D
})
mix.config.webpackConfig.output = {
chunkFilename: 'js/[name].bundle.js',
publicPath: '/'
}
mix
.js('resources/js/app.js', 'public/js')
.extract(['vue'])
.webpackConfig({
resolve: {
alias: {
'#': path.resolve('resources/') // just to use relative path properly
}
}
})
here is the package.json file (only including required dev dependencies)
{
"#babel/core": "^7.8.7",
"#babel/plugin-syntax-dynamic-import": "^7.8.3",
"#babel/preset-env": "^7.8.7",
"laravel-mix": "^4.1.4",
}
hope this resolves the issue
I am currently want to test my effects with ngrx/effects. I followed the markdown but I have an error when I want run my test.
Cannot find module 'rxjs/testing' from 'jasmine-marbles.umd.js'
Here is my code (For the moment I did not do expectations, I just want my test runs) :
import { TestBed } from '#angular/core/testing'
import { provideMockActions } from '#ngrx/effects/testing'
import { ReplaySubject } from 'rxjs/ReplaySubject'
import { hot, cold } from 'jasmine-marbles'
import { Observable } from 'rxjs/Observable'
import { VersionService } from '../../service/version/version.service'
import { DataEffects } from './data.effect'
import { RequestVersions, ReceiveVersions } from './data.action'
describe('My Effects', () => {
let versionService: VersionService
let effects: DataEffects
let actions: Observable<any>
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
// any modules needed
],
providers: [
DataEffects,
provideMockActions(() => actions),
{provide: VersionService, useValue: {
getVersions: jest.fn().mockReturnValueOnce({data: {versions: 'MOCKED_VERSION_RESULT'}})
}}
],
})
versionService = TestBed.get(VersionService)
effects = TestBed.get(DataEffects)
})
it('should work', () => {
const action = new RequestVersions()
const completion = new ReceiveVersions('MOCKED_VERSION_RESULT')
actions = hot('--a-', { a: action });
const expected = cold('--b', { b: completion })
})
}
And here what my package.json look like :
[...]
"dependencies": {
[... all #angular import ...]
"#ngrx/effects": "^5.2.0",
"#ngrx/store": "^5.2.0",
"#ngrx/store-devtools": "^5.2.0",
"bootstrap": "^4.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"#angular/cli": "1.6.7",
"#angular/compiler-cli": "^5.2.0",
"#angular/language-service": "^5.2.0",
"#types/jest": "^22.1.4",
"#types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-marbles": "^0.3.0",
"jest": "^22.4.2",
"jest-junit": "^3.6.0",
"jest-preset-angular": "^5.2.0",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
[...]
Can anyone help me in this matter ?
Just ran into this as well.
In my case using jasmine-marbles#v0.2.0 instead of the #latest resolve it, since it doesn't seem to require the peer dependency of the beta rxjs 6 release