8000 ERROR Cannot read properties of null (reading 'useState') · Issue #526 · oblador/loki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ERROR Cannot read properties of null (reading 'useState') #526
Open
@ds-pankov

Description

@ds-pankov

There is an error when starting the Loki, but it works.

loki test v0.35.0
(node:9338) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode.
 SDK releases are limited to address critical bug fixes and security issues only.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the blog post at https://a.co/cUPnyil
(Use `node --trace-warnings ...` to show where the warning was created)
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
The above error occurred in the <Static> component:

    at Static (/Users/dspankov/Dev/aaag/dashboard/node_modules/ink/build/components/Static.js:36:13)
    at ink-box
    at /Users/dspankov/Dev/aaag/dashboard/node_modules/ink/build/components/Box.js:39:11
    at TaskList (/Users/dspankov/Dev/aaag/dashboard/node_modules/@loki/runner/src/commands/test/renderers/interactive/TaskList.js:108:3)
    at App (/Users/dspankov/Dev/aaag/dashboard/node_modules/@loki/runner/src/commands/test/renderers/interactive/App.js:32:5)
    at App (/Users/dspankov/Dev/aaag/dashboard/node_modules/ink/build/components/App.js:42:9)

React will try to recreate this component tree from scratch using the error boundary you provided, InternalApp.

  ERROR  Cannot read properties of null (reading 'useState')

 /Users/dspankov/Dev/aaag/dashboard/node_modules/react/cjs/react.development.js:1622:21

 1619: }
 1620: function useState(initialState) {
 1621:   var dispatcher = resolveDispatcher();
 1622:   return dispatcher.useState(initialState);
 1623: }
 1624: function useReducer(reducer, initialArg, init) {
 1625:   var dispatcher = resolveDispatcher();

package.json:

{
  "loki": {
    "configurations": {
      "chrome.laptop": {
        "target": "chrome.app",
        "width": 1366,
        "height": 768,
        "deviceScaleFactor": 1,
        "mobile": false
      }
    }
  },
  "dependencies": {
    "@tailwindcss/typography": "^0.5.15",
    "framer-motion": "^11.5.5",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "tailwind-merge": "^2.5.2",
    "tailwindcss": "^3.4.12"
  },
  "devDependencies": {
    "@chromatic-com/storybook": "^1.9.0",
    "@eslint/js": "^9.9.0",
    "@storybook/addon-essentials": "^8.3.2",
    "@storybook/addon-interactions": "^8.3.2",
    "@storybook/addon-links": "^8.3.2",
    "@storybook/addon-onboarding": "^8.3.2",
    "@storybook/blocks": "^8.3.2",
    "@storybook/react": "^8.3.2",
    "@storybook/react-vite": "^8.3.2",
    "@storybook/test": "^8.3.2",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "@vitejs/plugin-react": "^4.3.1",
    "eslint": "^9.9.0",
    "eslint-plugin-react-hooks": "^5.1.0-rc.0",
    "eslint-plugin-react-refresh": "^0.4.9",
    "eslint-plugin-storybook": "^0.8.0",
    "globals": "^15.9.0",
    "loki": "^0.35.1",
    "postcss": "^8.4.47",
    "storybook": "^8.3.2",
    "typescript": "^5.5.3",
    "typescript-eslint": "^8.0.1",
    "vite": "^5.4.1"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0