I have an Angular library that I'm working to update from Angular 11 to 13. Jest ran fine in 11 and 12, but now I'm having a lot of trouble with v13. I've followed the steps outlined here
The error I'm getting is as follows:
Cannot find module '#angular/core/testing' from 'node_modules/jest-preset-angular/setup-jest.js'
Require stack:
node_modules/jest-preset-angular/setup-jest.js
jest.setup.ts
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
at Object.<anonymous> (node_modules/jest-preset-angular/setup-jest.js:2:24)
It seems odd that it's looking for angular core files within the setup-jest file.
jest.config.js
module.exports = {
preset: 'jest-preset-angular',
moduleFileExtensions: ['ts', 'html', 'js', 'json', 'mjs'],
snapshotSerializers: [
],
roots: ['src'],
moduleNameMapper: {
'^lodash-es$': '<rootDir>/node_modules/lodash/index.js'
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testMatch: ['<rootDir>/src/**/*.spec.ts'],
transform: {
'^.+\\.ts?$': 'ts-jest',
'^.+\\.mjs?$': 'ts-jest',
},
transformIgnorePatterns: ['node_modules/(?!(jest-test))', 'node_modules/(?!.*\\.mjs$)', 'node_modules/(?!\\#angular)'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
coverageReporters: ['json', 'text', 'html', 'cobertura'],
reporters: ['default', ['jest-junit', { outputDirectory: 'TestResults', outputName: 'jest-junit.xml' }]],
};
jest.setup.ts
import 'zone.js';
import 'zone.js/testing';
import 'jest-preset-angular/setup-jest';
package.json
{
"name": "my-lib-name",
"version": "12.0.2",
"description": "",
"main": "src/main.ts",
"scripts": {
"build": "npm run clean && npm run build:types && npm run build:umd && npm run build:esm2015 && npm run build:app",
"build:app": "tsc --project tsconfig.app.json",
"build:types": "tsc --project tsconfig.app.json --emitDeclarationOnly",
"build:umd": "tsc --project tsconfig.umd.json",
"build:esm2015": "tsc --project tsconfig.esm2015.json",
"clean": "rimraf dist",
"test": "jest --watch-all --detect-open-handles --reporters=default",
"lint": "eslint -c .eslintrc.js --ext .ts ./src",
"ci:test": "jest --ci --no-cache --maxWorkers=4 --detect-open-handles --coverage",
"postbuild": "node scripts/postbuild.js"
},
"author": "",
"license": "ISC",
"peerDependencies": {
"#types/lodash-es": "^4.17.4",
"date-fns": "^2.13.0",
"lodash-es": "^4.17.21",
"rxjs": "^6.5.5"
},
"devDependencies": {
"#angular-devkit/build-angular": "^13.3.9",
"#angular/animations": "^13.3.11",
"#angular/cdk": "^12.2.13",
"#angular/cli": "^13.3.9",
"#angular/common": "^13.3.11",
"#angular/compiler": "^13.3.11",
"#angular/compiler-cli": "^13.3.11",
"#angular/core": "^13.3.11",
"#angular/forms": "^13.3.11",
"#angular/material": "^12.2.13",
"#angular/platform-browser": "^13.3.11",
"#angular/platform-browser-dynamic": "^13.3.11",
"#types/chance": "^1.1.3",
"#types/estree": "^1.0.0",
"#types/jest": "^26.0.22",
"#types/lodash": "^4.14.168",
"#types/lodash-es": "^4.17.4",
"#typescript-eslint/eslint-plugin": "^4.14.2",
"#typescript-eslint/parser": "^4.14.2",
"chance": "^1.1.8",
"date-fns": "^2.13.0",
"eslint": "^7.19.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^31.6.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"jest": "^26.6.3",
"jest-junit": "^12.0.0",
"jest-marbles": "^2.5.1",
"jest-preset-angular": "^12.2.0",
"lodash-es": "^4.17.21",
"rxjs": "6.5.5",
"ts-jest": "^26.5.4",
"ts-loader": "^8.0.17",
"ts-node": "^9.1.1",
"tslib": "^2.4.0",
"typescript": "^4.6.4",
"zone.js": "~0.11.4"
},
"dependencies": {
"ng-packagr": "^12.2.7"
}
}
It seems that you are on an old version of Jest (version 26). Jest Preset Angular version 12 requires Jest version 28.
According to Jest Preset Angular's documentation, you are missing this setting in jest.config.js:
module.exports = {
globalSetup: 'jest-preset-angular/global-setup',
}
Make sure to review Jest Preset Angular's migration guide for Angular 13.
Related
I'm trying to add a package on my project called pretty-checkbox-vue I followed its instruction but it seemed it did not work. The documentation said I need to add the SCSS file so I did
this is my code on vue.config.js
module.exports = {
css: {
loaderOptions: {
scss: {
additionalData: `
#import '~pretty-checkbox/src/pretty-checkbox.scss';
`
}
}
}
};
and this my package.json
{
"name": "janu-form-generator",
"version": "1.0.0",
"description": "",
"main": "dist/janu-form-generator.ssr.js",
"browser": "dist/janu-form-generator.esm.js",
"module": "dist/janu-form-generator.esm.js",
"unpkg": "dist/janu-form-generator.min.js",
"files": [
"dist/*",
"src/**/*.vue"
],
"sideEffects": false,
"scripts": {
"serve": "vue-cli-service serve dev/serve.js",
"prebuild": "rimraf ./dist",
"build": "cross-env NODE_ENV=production rollup --config build/rollup.config.js",
"build:ssr": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format cjs",
"build:es": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format es",
"build:unpkg": "cross-env NODE_ENV=production rollup --config build/rollup.config.js --format iife"
},
"dependencies": {
"pretty-checkbox-vue": "^1.1.9",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-scss": "^3.0.0",
"sass": "^1.49.8",
"sass-loader": "^10.1.1",
"vuetify": "^2.6.3"
},
"devDependencies": {
"#babel/core": "^7.14.6",
"#babel/preset-env": "^7.14.7",
"#rollup/plugin-alias": "^3.1.2",
"#rollup/plugin-babel": "^5.3.0",
"#rollup/plugin-commonjs": "^14.0.0",
"#rollup/plugin-node-resolve": "^9.0.0",
"#rollup/plugin-replace": "^2.4.2",
"#vue/cli-plugin-babel": "^4.5.13",
"#vue/cli-service": "^4.5.13",
"cross-env": "^7.0.3",
"minimist": "^1.2.5",
"rimraf": "^3.0.2",
"rollup": "^2.52.8",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-vue": "^5.1.9",
"vue": "^2.6.14",
"vue-loader": "^17.0.0",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46.0"
},
"peerDependencies": {
"vue": "^2.6.14"
},
"engines": {
"node": ">=12"
}
}
the problem that I'm experiencing is that the look of the radio input and checkbox did not change
I get this error when I run npm test. I've looked at a number of posts, solutions, etc. that suggest making edits to package.json, babel.config.js, jest.config.js and I still receive this error. I thought it could be a version issue with React Native, but I'm on the latest version 0.60.4 and it's mentioned in a few issues that this is solved in master. Perhaps I'm overlooking something, but I'm coming up short on what else it could be.
The following is the test that fails as a result:
import { geolocationRequest } from '../location';
let mockGeoCoding = jest.fn();
jest.mock('react-native-geocoding', () => ({
openURL: mockGeoCoding,
}));
describe('geolocationRequest', () => {
it('creates a properly formatted action', () => {
expect(geolocationRequest()).toMatchSnapshot();
})
})
Thoughts?
package.json
{
"name": "<app-name>",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --config ../../../../rn-cli.config.js",
"start:ios": "react-native run-ios",
"start:android": "react-native run-android",
"clean:ios": "cd ios/ && pod deintegrate && pod install",
"clean:android": "cd android && ./gradlew clean",
"test": "jest --watch",
"test:coverage": "jest --coverage && open coverage/lcov-report/index.html",
"fix": "eslint --fix .",
"lint:ts": "tslint --fix --project ./tsconfig.json",
"lint:fix": "npm run lint:ts --fix",
"lint:check": "tslint --type-check --project"
},
"dependencies": {
"#react-native-community/async-storage": "1.4.2",
"appcenter": "1.12.2",
"appcenter-analytics": "1.12.2",
"appcenter-crashes": "1.12.2",
"axios": "^0.19.0",
"expo-font": "4.0.0",
"polyline": "0.2.0",
"react": "16.8.6",
"react-devtools": "3.6.1",
"react-native": "0.60.*",
"react-native-animatable": "1.3.2",
"react-native-auth0": "1.4.2",
"react-native-easy-grid": "0.2.1",
"react-native-elements": "1.1.0",
"react-native-geocoding": "0.3.0",
"react-native-gesture-handler": "1.3.0",
"react-native-maps": "0.24.2",
"react-native-vector-icons": "6.4.2",
"react-navigation": "3.9.1",
"react-redux": "7.1.0",
"redux": "4.0.0",
"redux-thunk": "2.3.0",
"scheduler": "0.14.0"
},
"devDependencies": {
"#babel/plugin-proposal-class-properties": "^7.5.5",
"#babel/preset-typescript": "^7.3.3",
"#types/enzyme": "^3.10.3",
"#types/enzyme-adapter-react-16": "^1.0.5",
"#types/jest": "^24.0.17",
"#types/polyline": "0.1.28",
"#types/react": "16.8.13",
"#types/react-native": "0.57.43",
"#types/react-native-auth0": "1.3.0",
"#types/react-native-vector-icons": "6.4.0",
"#types/react-redux": "^7.1.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "24.3.1",
"babel-preset-expo": "5.1.1",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.4.0",
"eslint": "5.15.1",
"eslint-config-airbnb": "17.1.0",
"eslint-plugin-import": "2.16.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"jest": "^24.3.1",
"jest-fetch-mock": "^2.1.2",
"jest-localstorage-mock": "^2.4.0",
"metro-react-native-babel-preset": "0.53.0",
"react-dom": "^16.8.6",
"react-native-typescript-transformer": "1.2.12",
"react-test-renderer": "^16.6.3",
"redux-mock-store": "^1.5.3",
"ts-jest": "^24.0.2",
"tslint": "5.16.0",
"typescript": "3.4.3"
},
"jest": {
"preset": "react-native"
}
}
jest.config.js
module.exports = {
"preset": 'react-native',
"verbose": true,
"setupFilesAfterEnv": ["<rootDir>/__tests__/setup.js", "jest-localstorage-mock"],
"roots": [
"<rootDir>/src"
],
"transform": {
"^.+\\.tsx?$": "ts-jest",
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"testPathIgnorePatterns": ['/node_modules/'],
"snapshotSerializers": ["enzyme-to-json/serializer"],
// "collectCoverageFrom": ["src/**/*.tsx"],
"collectCoverage": true,
};
babel.config.js
module.exports = {
"presets": ["module:metro-react-native-babel-preset"]
}
I've been struggling with the same issue.
Based on this comment on github From harudev
[...] So I tested some files to test project, and find out "react-native.config.js" file was the reason.
If there is someone suffered this issue, try to remove file or options from one of your "*.config.js" 😅
So I did remove all of my *.config.js file and the error is now gone.
Hopefully this could help you.
Note that you can reproduce the behavior of the *.confing.js file with package.json
For me this happened at an update of RN from 0.59.10 to 0.61.4.
I tried several fixes but nothing worked.
The only workaround that I've found was to set metro.config.js as below:
const blacklist = require('metro-config/src/defaults/blacklist');
module.exports = {
resolver: {
blacklistRE: blacklist([
/node_modules\/.*\/node_modules\/react-native\/.*/,
]),
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};
Source: jamalx31's answer from here:
https://github.com/facebook/react-native/issues/24065#issuecomment-537489786
The issue is reported and documented here:
https://github.com/facebook/react-native/issues/24065
and here:
https://github.com/facebook/react-native/issues/23943
Had the same error, after a good amount of soul searching (google searching)
i just ran npx react-native start oposed to runing my local react-native.
In my laravel 5. Vuejs 2, Vuex 3 app I got warning in my console:
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: function Vue (options) {
if (!(this instanceof Vue)) {
warn('Vue is a constructor and should be called with the `new` keyword');
}
this._init(options);
}, _f: undefined, _strict: undefined, _locale: [object Object]
Error
at Function.createFromInputFallback (http://local-hostels2.com/js/app.js?dt=1559733588:58205:98)
at configFromInput (http://local-hostels2.com/js/app.js?dt=1559733588:60508:19)
at prepareConfig (http://local-hostels2.com/js/app.js?dt=1559733588:60479:13)
at createFromConfig (http://local-hostels2.com/js/app.js?dt=1559733588:60446:44)
at createLocalOrUTC (http://local-hostels2.com/js/app.js?dt=1559733588:60533:16)
at createLocal (http://local-hostels2.com/js/app.js?dt=1559733588:60537:16)
at hooks (http://local-hostels2.com/js/app.js?dt=1559733588:57897:29)
at Function.Vue.use (http://local-hostels2.com/js/app.js?dt=1559733588:108861:14)
at Module../resources/js/app.js (http://local-hostels2.com/js/app.js?dt=1559733588:117240:44)
at __webpack_require__ (http://local-hostels2.com/js/app.js?dt=1559733588:20:30)
composer.json :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"fzaninotto/faker": "^1.8",
"intervention/image": "^2.4",
"laracasts/utilities": "^3.0",
"laravel/framework": "5.7.*",
"laravel/tinker": "^1.0",
"orangehill/iseed": "^2.6",
"pusher/pusher-php-server": "^3.4",
"tymon/jwt-auth": "^1.0.0",
"wboyz/laravel-enum": "^0.2.1",
"zizaco/entrust": "^1.9"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"beyondcode/laravel-query-detector": "^1.0",
"filp/whoops": "^2.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0",
"xethron/migrations-generator": "^2.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
My package.json :
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.19.0",
"bootstrap": "^4.3.1",
"cross-env": "^5.1",
"jquery": "^3.4.0",
"laravel-mix": "^4.0.15",
"lodash": "^4.17.5",
"popper.js": "^1.15.0",
"resolve-url-loader": "^2.3.2",
"sass": "^1.19.0",
"sass-loader": "^7.1.0",
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"font-awesome": "^4.7.0",
"laravel-echo": "^1.5.3",
"marked": "^0.6.2",
"moment": "^2.24.0",
"pusher-js": "^4.4.0",
"vee-validate": "^2.2.5",
"vee-validate-laravel": "^1.1.0",
"vue-carousel": "^0.18.0",
"vue-color": "^2.7.0",
"vue-focus": "^2.1.0",
"vue-form-wizard": "^0.8.4",
"vue-js-modal": "^1.3.28",
"vue-jstree": "^2.1.6",
"vue-moment": "^4.0.0",
"vue-nav-tabs": "^0.5.7",
"vue-notification": "^1.3.16",
"vue-router": "^3.0.6",
"vue-select": "^2.6.4",
"vue-wysiwyg": "^1.7.2",
"vue2-filters": "^0.6.0",
"vuejs-paginate": "^2.1.0",
"vuex": "^3.1.0"
}
}
Actually momentjs is not installed/used in my app, that can be checked in config files above.
It seems not critical now, but I would like to fix it anyway...
Can you please give a hint what could raise this warning and how to fix it?
Thanks!
Well, are you sure you don't use the vue-moment plugin in your code? We can read "vue-moment": "^4.0.0", in your packages.json file. I don't have access to your code but I imagine you're using it somewhere in your code. In your error, we can read arguments that contains _isAMomentObject: true... It should be somewhere a moment object.
I'm playing around with gzip compression for building out my react project (It's a full stack application) when I run the build script with npm I get no errors but in the process it spits me back around 10 bundles with 10 .gz file extensions instead of one and I'm not sure why?
Here is my code:
Production Webpack
const webpack = require("webpack");
const path = require("path");
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = {
entry: ["babel-polyfill", __dirname + "/src/index.js"],
output: {
path: __dirname + "/public",
filename: "bundle.js",
publicPath: "/"
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
query: {
presets: ["react", "env", "stage-0"]
}
}
},
{
test: /\.css$/,
use: [
{ loader: "style-loader" },
{ loader: "css-loader" },
{ loader: "sass-loader" }
]
}
]
},
plugins: [
new CompressionPlugin({
filename: "[path].gz[query]",
algorithm: "gzip",
test: /\.js$|\.css$|\.html$/,
minRatio: 0.8,
threshold: 10240
}),
new webpack.DefinePlugin({
"process.env.NODE_ENV": JSON.stringify("production")
})
]
};
NPM Build Script
{
"name": "",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"client": "webpack-dev-server --port 3312 --progress --color --profile --config webpack.development.config.js --mode development --hot",
"clean": "rm -rf build public/bundle.js",
"server": "nodemon server/main.js",
"sass": "node-sass -w public/assets/scss -o public/assets/css/ --recursive",
"dev": "concurrently \"npm run server\" \"npm run sass\" \"npm run client\"",
"prod": "npm run clean && webpack --config webpack.production.config.js --mode production --progress --colors --profile"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"aws-sdk": "^2.373.0",
"base-64": "^0.1.0",
"body-parser": "^1.18.3",
"cookie-parser": "^1.4.3",
"cors": "^2.8.5",
"data-tip": "0.0.52",
"express": "^4.16.4",
"file-type": "^10.6.0",
"jquery": "^3.3.1",
"moment": "^2.22.2",
"mysql": "^2.16.0",
"nodemailer": "^4.7.0",
"nodemailer-juice": "^1.0.1",
"paypal-rest-sdk": "^1.8.1",
"react": "^16.6.3",
"react-bootstrap": "^0.32.4",
"react-ckeditor-component": "^1.1.0",
"react-confirm-alert": "^2.0.7",
"react-dom": "^16.6.3",
"react-js-pagination": "^3.0.2",
"react-loadable": "^5.5.0",
"react-router-dom": "^4.3.1",
"react-s3-uploader": "^4.8.0",
"read-chunk": "^3.0.0",
"sha256": "^0.2.0"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^8.0.4",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"browser-sync": "^2.26.3",
"browser-sync-webpack-plugin": "^2.2.2",
"compression-webpack-plugin": "^2.0.0",
"concurrently": "^4.1.0",
"css-loader": "^2.0.0",
"html-webpack-plugin": "^3.2.0",
"node-sass": "^4.10.0",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"webpack": "^4.27.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
}
}
Screenshot of the output:
This is because you are using Webpack 4, and it comes with automatic code-splitting. You can read how to configure it here:
https://webpack.js.org/guides/code-splitting/
When I run create-react-native-app I'm getting a peer dependency for react-native-maps to use react-native#0.54. I need to be able to use react-native#0.55.2 and react#16.3.1
Presented below is the package.json file for react-native-maps. Notice line 81,82,97 and 98
could someone show how to edit this json file and how to update react-native-maps?
When I tried with:
npm --depth 9999 update
I ended up getting tons of errors about duplicate packages.
{
"_from": "react-native-maps#0.21.0",
"_id": "react-native-maps#0.21.0",
"_inBundle": false,
"_integrity": "sha512-FkCCV1AyaT5ut5ZTKNIdFWBxRUXZovGTydy7U4Cyifj2dv0Q3Sv21B0Myj+aoGhJhvBJzxsU25dDGQN3TP7b/Q==",
"_location": "/react-native-maps",
"_phantomChildren": {
"babel-plugin-check-es2015-constants": "6.22.0",
"babel-plugin-syntax-async-functions": "6.13.0",
"babel-plugin-syntax-class-properties": "6.13.0",
"babel-plugin-syntax-flow": "6.18.0",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-plugin-syntax-trailing-function-commas": "6.22.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-es2015-arrow-functions": "6.22.0",
"babel-plugin-transform-es2015-block-scoping": "6.26.0",
"babel-plugin-transform-es2015-classes": "6.24.1",
"babel-plugin-transform-es2015-computed-properties": "6.24.1",
"babel-plugin-transform-es2015-destructuring": "6.23.0",
"babel-plugin-transform-es2015-for-of": "6.23.0",
"babel-plugin-transform-es2015-function-name": "6.24.1",
"babel-plugin-transform-es2015-literals": "6.22.0",
"babel-plugin-transform-es2015-modules-commonjs": "6.26.2",
"babel-plugin-transform-es2015-parameters": "6.24.1",
"babel-plugin-transform-es2015-shorthand-properties": "6.24.1",
"babel-plugin-transform-es2015-spread": "6.22.0",
"babel-plugin-transform-es2015-template-literals": "6.22.0",
"babel-plugin-transform-flow-strip-types": "6.22.0",
"babel-plugin-transform-object-assign": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-plugin-transform-react-display-name": "6.25.0",
"babel-plugin-transform-react-jsx": "6.24.1",
"babel-plugin-transform-react-jsx-source": "6.22.0",
"babel-plugin-transform-regenerator": "6.26.0",
"lodash": "4.17.10",
"react-transform-hmr": "1.0.4"
},
"_requested": {
"type": "version",
"registry": true,
"raw": "react-native-maps#0.21.0",
"name": "react-native-maps",
"escapedName": "react-native-maps",
"rawSpec": "0.21.0",
"saveSpec": null,
"fetchSpec": "0.21.0"
},
"_requiredBy": [
"/expo"
],
"_resolved": "https://registry.npmjs.org/react-native-maps/-/react-native-maps-0.21.0.tgz",
"_shasum": "005f58e93d7623ad59667e8002101970ddf235c2",
"_spec": "react-native-maps#0.21.0",
"_where": "d:\\atestbed\\native-react\\lecture4-contacts\\node_modules\\expo",
"author": {
"name": "Leland Richardson",
"email": "leland.m.richardson#gmail.com"
},
"bugs": {
"url": "https://github.com/airbnb/react-native-maps/issues"
},
"bundleDependencies": false,
"dependencies": {
"babel-plugin-module-resolver": "^2.3.0",
"babel-preset-react-native": "1.9.0"
},
"deprecated": false,
"description": "React Native Mapview component for iOS + Android",
"devDependencies": {
"babel-eslint": "^6.1.2",
"babel-preset-airbnb": "^1.1.1",
"eslint": "^3.3.1",
"eslint-config-airbnb": "^10.0.1",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.1.0",
"eslint-plugin-prefer-object-spread": "^1.1.0",
"eslint-plugin-react": "^6.1.2",
"gitbook-cli": "^2.3.0",
"lodash": "^4.17.2",
"prop-types": "^15.5.10",
"react": "^16.3.0-alpha.1",
"react-native": "^0.54"
},
"homepage": "https://github.com/airbnb/react-native-maps#readme",
"keywords": [
"react",
"react-native",
"react-component",
"map",
"mapview",
"google-maps",
"mapkit"
],
"main": "index.js",
"name": "react-native-maps",
"peerDependencies": {
"react": "^16.0",
"react-native": "^0.51 || ^0.52 || ^0.53 || ^0.54",
"prop-types": "^15.0 || ^16.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/airbnb/react-native-maps.git"
},
"rnpm": {
"android": {
"sourceDir": "./lib/android"
}
},
"scripts": {
"build": "npm run build:js && npm run build:android && npm run build:ios",
"build:android": "./gradlew :react-native-maps:assembleDebug",
"build:ios": "bundle install --path ./example/ios/bundles && bundle exec pod install --project-directory=./example/ios/",
"build:js": "exit 0",
"ci": "npm run lint",
"lint": "eslint ./",
"preversion": "./scripts/update-version.js",
"run:android": "./gradlew installDebug && npm run start:android",
"run:ios": "react-native run-ios --project-path ./example/ios",
"run:packager": "./node_modules/react-native/packager/packager.sh",
"start": "node node_modules/react-native/local-cli/cli.js start",
"start:android": "adb shell am start -n com.airbnb.android.react.maps.example/.MainActivity"
},
"version": "0.21.0"
}
ok, so if we just update the package.json file for react-native-maps in the following way:
under devDependencies:
"react": "^16.3.1",
"react-native": "^0.55.2"
under peerDependencies:
"react": "^16.3.1",
"react-native": "^0.55",
then back in the top project install eslint#4.0.0 and ajv#6.0.0 and add them to the dependencies in the package.json.