Phantomjs error while running tests in angular cli - phantomjs

I am trying to run ng test in Angular Cli project using phantom browser and I am getting below error. I googled it and realized that it has something to do with polyfill (Backward compatibility?). I want to understand what's wrong here and how to fix this issue. Thanks in advance!
PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR
TypeError: undefined is not an object (evaluating '(_a = ((Object))).assign.apply')
at webpack:///~/#angular/common/src/pipes/intl.js:187:0 <- src/test.ts:34449

you need to uncomment those from your polyfills.ts
import 'core-js/es6/object';
import 'core-js/es6/array';
import 'intl'; // Run `npm install --save intl`.

Related

Version mismatch when installing vue-apollo in Vue 3.0 application

I set up a new Vue 3.0 application using
vue create
Then I add apollo to my application using
vue add apollo
Then when I run npm run build I get the following error
ERROR Failed to compile with 2 errors
Module Error (from ./node_modules/vue-loader/lib/index.js):
Vue packages version mismatch:
- vue#3.0.0 (C:\workspace\StatusTool\dummy-project\node_modules\vue\index.js)
- vue-template-compiler#2.6.12 (C:\workspace\StatusTool\dummy-project\node_modules\vue-template-compiler\package.json)
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader#>=10.0, simply update vue-template-compiler.
If you are using vue-loader#<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
Module build failed (from ./node_modules/vue-loader/lib/index.js):
TypeError: Cannot read property 'parseComponent' of undefined
at parse (C:\workspace\StatusTool\dummy-project\node_modules\#vue\component-compiler-utils\dist\parse.js:15:23)
at Object.module.exports (C:\workspace\StatusTool\dummy-project\node_modules\vue-loader\lib\index.js:67:22)
What am I doing wrong?
Version Information:
#vue/cli: 4.5.6
vue-cli-plugin-apollo: "0.22.2"
apollo: 2.31.0
Seems like package vue-apollo is not installed
Do not use vue/cli: 4.5.6 instead you need to use Manual install
vue add apollo is only for vue-cli 3 projects.
It is simple to install.
npm install --save vue-apollo graphql apollo-boost
or
yarn add vue-apollo graphql apollo-boost
You still will be able to use apollo-boost

Graphql error when building react-native app

I'm getting this error on node when I try and npm run android my react native app
Unable to resolve "./printError" from
"node_modules/graphql/error/index.js
The error only occurs when attempting to import any libraries that require Graphql. Graphql is installed, and I've uninstalled and reinstalled my node_modules several times attempting to fix this but nothing works. Any help would be appreciated.
printError was added with v0.12.0. Apollo requires at least v14.5.4. You can install the latest version with npm install graphql#latest.

The development server returned response error code: 500 (React Native)

After installing the following libraries:
#react-navigation/native
#react-navigation/bottom-tabs
I started receiving the error: The development server returned response error code: 500 (React Native). I tried a lot but could not figure out what is the reason.
Can somebody help to figure it out?
Delete babel-preset-react-native folder inside node_modules and then install older version 2.1.0 of this library with npm install babel-preset-react-native#2.1.0 --save-dev

react-native reazy unable to resolve module

I am trying to test out the reazy react-native framework, I can't get the sample app up and running.
when I run the react-native run-ios command i am getting the following error:
unable to resolve module react/lib/reactComponentwithPureRenderMixing
node_modules/react-native-router-flux/node_modules/react-addons-pure-render-mixin/index.js
Module does not exist in the module map
I have removed my modules and reinstalled them. the module folder is there for react-native-router-flux
nothing in the JS console
any help is appreciated
Please install router flux using below and refresh
npm install --save react-native-router-flux
Hope! this helps.
Run the following command and it will be solved-
yarn add react-addons-pure-render-mixin
this is manual step to add this module.

PhantomJS Mocktail Map Error

Trying to run my jasmine tests, writeen in ES2015 via Babel, in phantomjs via karma-phantomjs; getting this issue--
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
ReferenceError: Can't find variable: Map
at /var/folders/mf/n6g7nwd119vbmkg80d0yvm380000gn/T/19f6091b4a350b18bbe890201c914b34.browserify:26852 <- node_modules/mocktail/dist/mocktail.js:41:0
Ran npm install --save-dev babel-polyfill, modified my setup.js mocktail file like so:
import 'babel-polyfill';
import {env, ENV} from 'mocktail';
env(ENV.TESTING);