小编Moh*_*ajr的帖子

堆栈安装ghc-mod失败,OSX 10.13.4上存在依赖冲突

当我尝试通过堆栈安装ghc-mod时,我最终会遇到这些依赖性冲突

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for ghc-mod-5.8.0.0:
    Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25  (latest matching version is 1.24.2.0)
    base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10  (latest matching version is 4.9.1.0)
    cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified version  (latest matching version is 0.7.3.0)
    extra-1.6.8 from stack configuration does not match <1.6 && >=1.4  (latest matching version is …
Run Code Online (Sandbox Code Playgroud)

haskell hlint ghc-mod haskell-stack

7
推荐指数
1
解决办法
1308
查看次数

具有socket.io状态的UseEffect挂钩在套接字处理程序中不持久

我有以下反应成分

function ConferencingRoom() {
    const [participants, setParticipants] = useState({})
    console.log('Participants -> ', participants)

    useEffect(() => {
        // messages handlers
        socket.on('message', message => {
            console.log('Message received: ' + message.event)
            switch (message.event) {
                case 'newParticipantArrived':
                    receiveVideo(message.userid, message.username)
                    break
                case 'existingParticipants':
                    onExistingParticipants(
                        message.userid,
                        message.existingUsers
                    )
                    break
                case 'receiveVideoAnswer':
                    onReceiveVideoAnswer(message.senderid, message.sdpAnswer)
                    break
                case 'candidate':
                    addIceCandidate(message.userid, message.candidate)
                    break
                default:
                    break
            }
        })
        return () => {}
    }, [participants])

    // Socket Connetction handlers functions

    const onExistingParticipants = (userid, existingUsers) => {
        console.log('onExistingParticipants Called!!!!!')

        //Add local User …
Run Code Online (Sandbox Code Playgroud)

socket.io webrtc reactjs react-hooks

6
推荐指数
1
解决办法
816
查看次数

带有字符串列表变量“$_v0_data”的突变得到无效值 Graphql Node.js

我有这个简单的突变,效果很好

    type Mutation {
    addJob(
        url: String!
        description: String!
        position: String!
        company: String!
        date: DateTime!
        tags: [String!]!
    ): Job
}
Run Code Online (Sandbox Code Playgroud)

突变解析器

    function addJob(parent, args, context, info) {

    console.log('Tags => ', args.tags)
    // const userId = getUserId(context)
    return context.db.mutation.createJob(
        {
            data: {
                position: args.position,
                componay: args.company,
                date: args.date,
                url: args.url,
                description: args.description,
                tags: args.tags
            }
        },
        info
    )
}
Run Code Online (Sandbox Code Playgroud)

但是,一旦我尝试放置一组字符串(标签),如您在上面看到的那样,II 无法使其正常工作,并且出现此错误

Error: Variable "$_v0_data" got invalid value { ... , tags: ["devops", "aws"] }; Field "0" is not defined by type …
Run Code Online (Sandbox Code Playgroud)

node.js express graphql graphql-js prisma

5
推荐指数
1
解决办法
1690
查看次数