Comments (9)
v1.2.2 is released with support for [email protected] peer-dependency. Let me know how you get on.
from graphql-language-service.
welp, I guess GraphQL is dead. Long live SQL 😝
from graphql-language-service.
I'm in dependency hell 3 libraries up from this
from graphql-language-service.
This is getting very important.
I am getting an increasing number of problems due to different versions of graphql in the codebase.
And most of all: due to an issue in graphql versions before v13 that creates errors when multiple instances of graphql (even the same version) were created, see: https://github.com/graphql/graphql-js/releases/tag/v0.13.0 "Only trigger "one instance of graphql" error in DEV environments, removing false errors from minified bundles".
I am using a resolutions key in package.json to circumvent problems:
"resolutions": {
"graphql": "0.13.2"
}
npm ls
graphql lists in my case:
alexa@DESKTOP-6C4V66Q C:\Users\alexa\ae2
> npm ls graphql
[email protected] C:\Users\alexa\ae2
+-- [email protected]
| `-- [email protected]
| `-- [email protected]
| `-- [email protected]
| +-- UNMET DEPENDENCY graphql@^0.12.3
| `-- [email protected]
| `-- UNMET DEPENDENCY graphql@^0.12.3
`-- [email protected]
`-- UNMET DEPENDENCY graphql@>=0.6 <0.13
npm ERR! missing: graphql@^0.12.3, required by [email protected]
npm ERR! missing: graphql@^0.12.3, required by [email protected]
npm ERR! missing: graphql@>=0.6 <0.13, required by [email protected]
Someone else has asked postgraphile to update to graphql v13 but that seems blocked because of codemirror-graphql, which in turn depends on graphql-language-service: graphile/crystal#720.
Seems that [email protected] is one of the reasons graphql v13 can't be used. The up to date version (0.5.0) enables that though: https://github.com/graphcool/graphql-import/blob/master/package.json
So updating graphql-import could help.
Same is true for [email protected] (up to date: v2.0.1): https://github.com/graphcool/graphql-config/blob/master/package.json
from graphql-language-service.
I'm also having problems with multiple versions of graphql. Using webpack, I was able to resolve most of the issues by adding a resolve alias to make sure all modules are using the same graphql module:
resolve: {
alias: {
graphql: path.resolve('./node_modules/graphql'),
},
},
That said, it would be great to get all the graphql/*
packages up to date with the latest graphql version. Is there anything I or other community members can do to help?
from graphql-language-service.
@lostplan can we get an update here?
from graphql-language-service.
+1
from graphql-language-service.
I got so tired of NPM peerDependency hell I wrote this snippet to recursively remove all peerDependency
records from all package.json
files in node_modules
. This is probably a terrible idea but oh well it let me write my shrinkwrap/lockfile sooooo... Enjoy!
https://gist.github.com/TSMMark/5488758028b10d537bf1f721198a539e
const fs = require('fs')
function replaceInFile ({ file, pattern, replacement }) {
fs.readFile(file, 'utf8', (err, data) => {
if (err) {
return console.log(err)
}
const result = data.replace(pattern, replacement)
fs.writeFile(file, result, 'utf8', (err) => {
if (err) return console.log(err)
})
})
}
function removePeerDepsEntry (packageJsonFilePath) {
replaceInFile({
file: packageJsonFilePath,
pattern: /"peerDependencies":[^}]*{[^}]*},/,
replacement: '',
})
}
function recursiveClearPeerDeps (dir = 'node_modules') {
fs.readdir(dir, (err, files) => {
if (err) {
console.error('clear-peer-deps Error: ' + err.toString())
} else {
files.forEach((file) => {
const packageJsonFilePath = path.join(dir, file, 'package.json')
if (fs.existsSync(packageJsonFilePath)) {
removePeerDepsEntry(packageJsonFilePath)
}
const nestedNodeModules = path.join(dir, file, 'node_modules')
if (fs.existsSync(nestedNodeModules)) {
recursiveClearPeerDeps(nestedNodeModules)
}
})
}
})
}
from graphql-language-service.
@gaearon do you know anyone who could get the ball rolling on this issue?
from graphql-language-service.
Related Issues (20)
- Warnings with webpack HOT 26
- Keep Greenkeeper integration alive HOT 2
- Flow checks are busted in Travis CI HOT 2
- Local test runs busted HOT 6
- Consider removing multi-app support in configs HOT 3
- Warning: You may need an appropriate loader to handle this file type. HOT 4
- Upgrade graphql dependency HOT 1
- Use language server protocol watch instead of watchman when available HOT 3
- Online schema support HOT 1
- Support `textDocument/hover`
- Initial fragment caching does not work for some glob patterns
- Globs specified by .graphqlconfig includes are not honored as intended by spec
- File change notifications delivered via watchman do not work if there are projects specified in .graphqlconfig HOT 1
- GraphQLCache._readFilesFromInputDirs should handle case where glob stat result is `false` HOT 1
- Incompatible graphql-language-service-utils HOT 5
- GraphQL Language Service IntelliJ plugin HOT 23
- `graphql-config` discussion HOT 4
- Microsoft language server protocol spec compliance
- Have codemirror-graphql use graphql-language-service-interface HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-language-service.