GraphiQL subscriptions working with subscriptions-transport-ws 0.7.3, but not 0.8.2 - subscriptions

I have a nodejs GraphQL app running with the following
"graphql": "^0.10.5",
"graphql-errors": "^2.1.0",
"graphql-server-core": "^1.1.0",
"graphql-server-express": "^1.1.0",
"graphql-server-module-graphiql": "^1.1.0",
"graphql-subscriptions": "^0.4.4",
"graphql-tools": "^1.2.1",
"subscriptions-transport-ws": "^0.7.3",
Using this configuration, I can define a subscription in graphiql and watch the result appear in the output pane replacing the boilerplate message "Your subscription data will appear here after server publication!".
If I switch to the latest version of susbcriptions-transport-ws i.e.
"subscriptions-transport-ws": "^0.8.2",
this no longer works; the boilerplate message does not appear in the output pane and instead I get the cryptic [object] [object] message.
I've not been able to find any statement about version compatibility between graphiql and subscriptions-transport-ws; does anyone know if this version mix is supported?

I resolved the [Object Object] error in graphiql by reverting to these versions of following libraries in package.json:
"graphql-subscriptions": "^0.4.3",
"graphql-tools": "^1.0.0",
"subscriptions-transport-ws": "0.7.3",

Related

Why can't Prettier find the "prettier-plugin-tailwindcss" plugin on a Remix app?

Background
I'm trying to setup a Remix app using Tailwind CSS for styling and Prettier for styling. Recently the Tailwind team released their official classes-sorting plugin but for some reason Prettier says it "can't find it".
The error looks like the following in the Prettier output:
["INFO" - 1:17:09 PM] Formatting file:///home/juanzitelli/dev/human-decode/burger-reviews-hd/app/routes/dashboard/index.tsx
["ERROR" - 1:17:09 PM] Error resolving prettier configuration for /home/juanzitelli/dev/human-decode/burger-reviews-hd/app/routes/dashboard/index.tsx
My file structure (files related to the problem) looks like this:
/prettier.config.js
/tailwind.config.js
/package.json
"devDependencies": {
"#remix-run/dev": "^1.1.3",
"#remix-run/serve": "^1.2.2",
"#types/node": "^17.0.21",
"#types/react": "^17.0.24",
"#types/react-dom": "^17.0.9",
"autoprefixer": "^10.4.2",
"concurrently": "^7.0.0",
"dotenv": "^16.0.0",
"postcss": "^8.4.6",
"prettier": "^2.5.1",
"prettier-plugin-tailwindcss": "^0.1.8",
"prisma": "^3.10.0",
"tailwindcss": "^3.0.23",
"typescript": "^4.1.2"
},
"engines": {
"node": ">=14",
"yarn": "1.22.17"
},
Prettier config
`/prettier.config.js`
module.exports = {
plugins: [require('prettier-plugin-tailwindcss')],
};
> When hovering over that "require" I get an error that says:
module "/home/juanzitelli/dev/human-decode/burger-reviews-hd/node_modules/prettier-plugin-tailwindcss/dist/index"
Could not find a declaration file for module 'prettier-plugin-tailwindcss'. '/home/juanzitelli/dev/human-decode/burger-reviews-hd/node_modules/prettier-plugin-tailwindcss/dist/index.js' implicitly has an 'any' type.
Try `npm i --save-dev #types/prettier-plugin-tailwindcss` if it exists or add a new declaration (.d.ts) file containing `declare module 'prettier-plugin-tailwindcss';`ts(7016)```
I encountered this problem too before. Though I just tried adding the Tailwind Prettier plugin to a new Remix project and everything seems to be working. Here are the steps I performed:
Installed Tailwind npm install -D tailwindcss postcss autoprefixer concurrently
After finishing all the steps outlined in the link above, I ran npm install -D prettier prettier-plugin-tailwindcss
I don't have a prettier config file in place. I'm able to run Prettier through vscode and I can confirm that the Tailwind classes are automatically sorted.

CocoaPods could not find compatible versions for pod "Firebase/CoreOnly": React native firebase

Upon trying to update my pods to the latest in order to work with IOS 12.0 I keep getting this error. I've seen this error pretty well documented online but none of the current solutions I have found seem to work.
In Podfile:
RNFBApp (from `../node_modules/#react-native-firebase/app`) was resolved to 10.5.0, which depends on
Firebase/CoreOnly (~> 7.4.0)
RNFBAuth (from `../node_modules/#react-native-firebase/auth`) was resolved to 10.5.1, which depends on
Firebase/Auth (~> 7.4.0) was resolved to 7.4.0, which depends on
Firebase/CoreOnly (= 7.4.0)
react-native-camera/BarcodeDetectorMLKit (from `../node_modules/react-native-camera`) was resolved to 3.42.0, which depends on
Firebase/MLVisionBarcodeModel was resolved to 5.0.0, which depends on
Firebase/CoreOnly (= 5.0.0)
As far as pod install --repo-update and pod update etc I keep returning to this error. I've updated my dependancies manually in the package.json file to the latest and removed the pod.lock file. I've run a react native clean across it to ensure all cache files are cleaned and tried to reinstalling everything and still getting the error.
I'm sure I'm missing something that I either need to wipe somewhere but can't find where exactly I need to do this.
Here's my Pod file
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.0'
target 'shoppinStore' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'shoppinStoreTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'shoppinStore-tvOS' do
# Pods for shoppinStore-tvOS
target 'shoppinStore-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
'BarcodeDetectorMLKit'
]
And my Package.json
"name": "shoppinStore",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"#react-native-community/checkbox": "^0.5.7",
"#react-native-community/geolocation": "^2.0.2",
"#react-native-community/masked-view": "^0.1.10",
"#react-native-firebase/app": "^10.5.0",
"#react-native-firebase/auth": "^10.5.1",
"#react-native-firebase/firestore": "^10.5.1",
"#react-navigation/bottom-tabs": "^5.11.3",
"#react-navigation/native": "^5.9.0",
"#react-navigation/stack": "^5.13.0",
"firebase": "^8.2.3",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-camera": "^3.42.0",
"react-native-gesture-handler": "^1.9.0",
"react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.16.1",
"react-navigation": "^4.4.3",
"react-redux": "^7.2.2",
"redux": "^4.0.5"
},
"devDependencies": {
"#babel/core": "^7.8.4",
"#babel/runtime": "^7.8.4",
"#react-native-community/eslint-config": "^1.1.0",
"babel-jest": "^25.1.0",
"eslint": "^6.5.1",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "^0.59.0",
"react-test-renderer": "16.13.1"
},
"jest": {
"preset": "react-native"
}
}
I'm pretty new to React Native, this all happened after chasing errors trying to connect my phone to test the app to get the React Native Camera library to work. Not the project won't build at all. Any pointers will be greatly appreciative.
I had this problem due to M1 chip.
I deleted Pods folder
Deleted PodFile.lock
For M1 chip :
1. Install ffi
sudo arch -x86_64 gem install ffi
2. Re-install dependencies
arch -x86_64 pod install
I was getting this also so I updated my firebase packages in package.json, deleted podfile.lock in the ios folder, and ran pod repo update, then pod install.
Worked after that! Good luck!

Error: Cannot find module “mongodb” after meteor upgrade to 1.6.1.1

edit - There is something strange: mongo appears in both package.json and in .meteor/packages files (should it appear in package.json at all?? it wasn't there before the update) but in different versions. here is my package.json:
{
"name": "something",
"version": "1.1.1",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"#babel/runtime": "^7.0.0-beta.49",
"babel-runtime": "^6.26.0",
"bootstrap": "^3.3.7",
"google-protobuf": "^3.5.0",
"grpc": "^1.12.2",
"grpc-tools": "^1.6.6",
"meteor-node-stubs": "^0.3.3",
**"mongodb": "^3.1.0-beta4",**
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-progressbar.js": "^0.2.0",
"react-router": "^3.2.1",
"react-router-dom": "^4.2.2"
}
}
and here is my .meteor/packages:
meteor-base#1.3.0 # Packages every Meteor app needs to have
mobile-experience#1.0.5 # Packages for a great mobile UX
**mongo#1.4.2 # The database Meteor supports right now**
blaze-html-templates#1.0.4 # Compile .html files into Meteor Blaze views
reactive-var#1.0.11 # Reactive variable for tracker
tracker#1.1.3 # Meteor's client-side reactive programming library
standard-minifier-css#1.4.0 # CSS minifier run for production mode
standard-minifier-js#2.3.1 # JS minifier run for production mode
es5-shim#4.7.0 # ECMAScript 5 compatibility for older browsers
ecmascript#0.10.6 # Enable ECMAScript2015+ syntax in app code
shell-server#0.3.1 # Server-side component of the `meteor shell` command
session#1.1.7
tarang:ssl
After updating to 1.6.1.1, my app won’t run, crashing with message 'Error: Cannot find module “mongodb” '.
Tried to run meteor npm install, even took away the entire node_modules folder and built it again.
Tried to run meteor npm update.
Tried to run meteor npm install mongodb.
Tried to downgrade back to version 1.6.0.1.
Still can’t find mongodb.
Important - mongodb is there, all collections are there - I can access it through the terminal with "meteor mongo".
Any help?
If it helps - The data in the db can be erased if there is no other way.
(running on ubuntu 16.04)
Thanks
In the end, the problem was not in the project but in meteor globally, so I uninstalled and re-installed meteor globally, and everything got back to normal…
Thank you all!

Why won't eslint-config-rallycoding work with create-react-app?

I'm using Atom and the linter-eslint npm package. I have installed the following dev dependencies:
"devDependencies": {
"eslint": "^4.9.0",
"eslint-config-rallycoding": "^3.2.0",
"eslint-plugin-react": "^7.4.0"
}
This is my .eslintrc file in order to use the eslint-config-rallycoding eslint rules:
{
"extends": "rallycoding"
}
When I open a file, the first line shows this message:
The eslint-config-rallycoding eslint rules work great with the React/Redux starter set that the same author made, so I'm thinking something isn't set up right to use with create-react-app?
The error message is incredibly vague though and I am not seeing any errors in the specified file.

React-Native-Meteor update React-Native 0.33

I'm running a Meteor server and a React-Native client (working in iOS mainly for now). Since I updated to React-native 0.33 the MeteorListView Component throws the following error:
My 'UserDos' follows the example of InProgress-team/react-native-meteor. When replacing the MeteorListView with a regular ListView everything works fine. Is anyone experiences this issue or can pinpoint/direct me to solving the issue?
Version
"react": "^15.3.1",
"react-native": "^0.33.0",
"react-native-lock": "^0.4.0",
"react-native-meteor": "^1.0.0-rc15",
"react-native-scrollable-tab-view": "^0.6.0",
"react-redux": "^4.4.5",
"redux": "^3.6.0",
"redux-thunk": "^2.1.0",
Fixed by reinstalling macOS and fresh install of React-native and dependances. Bit extreme solution but probably some complications with development version and upgrades; did the trick though!

Resources