Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run Story, Some Syntax issue #474

Closed
sohamnandi77 opened this issue Jul 7, 2022 · 2 comments · Fixed by #488
Closed

Not able to run Story, Some Syntax issue #474

sohamnandi77 opened this issue Jul 7, 2022 · 2 comments · Fixed by #488
Labels
bug Something isn't working

Comments

@sohamnandi77
Copy link

sohamnandi77 commented Jul 7, 2022

image

My package.json

{
  "name": "test",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@apollo/client": "^3.2.5",
    "@dnd-kit/core": "^5.0.1",
    "@dnd-kit/modifiers": "^5.0.0",
    "@dnd-kit/sortable": "^6.0.0",
    "@dnd-kit/utilities": "^3.1.0",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.5.0",
    "@testing-library/user-event": "^7.2.1",
    "bootstrap": "^4.5.3",
    "date-fns": "^2.28.0",
    "date-fns-tz": "^1.1.6",
    "highcharts": "^8.1.2",
    "highcharts-react-official": "^3.0.0",
    "i18next": "^21.6.14",
    "i18next-http-backend": "^1.4.0",
    "lodash": "^4.17.20",
    "react": "^16.13.1",
    "react-bootstrap": "^1.4.0",
    "react-datepicker": "^4.8.0",
    "react-dom": "^16.13.1",
    "react-dropzone": "^11.3.2",
    "react-i18next": "^11.16.2",
    "react-router-dom": "^5.2.0",
    "react-scripts": "^4.0.0",
    "react-select": "^4.3.1",
    "react-table": "^7.7.0",
    "react-table-sticky": "^1.1.3",
    "react-toastify": "^8.1.0",
    "sass": "^1.33.0",
    "source-map-explorer": "^2.5.2"
  },
  "scripts": {
    "analyze": "source-map-explorer 'build/static/js/*.js'",
    "start": "react-scripts start",
    "lint": "eslint src --max-warnings=30",
    "test": "jest --coverage",
    "eject": "react-scripts eject",
    "storybook": "start-storybook -p 6006 -s public",
    "build-storybook": "build-storybook -s public"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "peerDependencies": {
    "babel-loader": "8.1.0"
  },
  "devDependencies": {
    "@babel/plugin-syntax-decorators": "^7.12.1",
    "react-error-overlay": "6.0.9",
    "@storybook/addon-a11y": "^6.5.5",
    "@storybook/addon-actions": "^6.5.5",
    "@storybook/addon-essentials": "^6.5.5",
    "@storybook/addon-interactions": "^6.5.5",
    "@storybook/addon-links": "^6.5.5",
    "@storybook/builder-webpack4": "^6.5.5",
    "@storybook/manager-webpack4": "^6.5.5",
    "@storybook/node-logger": "^6.5.5",
    "@storybook/preset-create-react-app": "^3.2.0",
    "@storybook/react": "^6.5.5",
    "@storybook/testing-library": "^0.0.11",
    "babel-eslint": "^10.1.0",
    "babel-preset-react-app": "^9.1.2",
    "env-cmd": "^10.1.0",
    "enzyme": "^3.11.0",
    "enzyme-adapter-react-16": "^1.15.2",
    "identity-obj-proxy": "^3.0.0"
  }
}
@joshbolduc joshbolduc added the bug Something isn't working label Jul 7, 2022
@joshbolduc
Copy link
Owner

It looks like there are a couple problems launching the internal on-demand server on Windows. As a workaround, you can manually launch the dev server and configure the extension to use that instead:

{
  "storyExplorer.server.external.url": "http://localhost:6006", // adjust as needed
  "storyExplorer.server.internal.enabled": false
}

joshbolduc added a commit that referenced this issue Jul 16, 2022
Instead of scanning just the launched process for an opened port that
may be running a Storybook server, also check for opened ports by any
child processes. This allows support for wrapper scripts that indirectly
launch a Storybook server, as well as Windows support (where invoking a
`start-storybook.cmd` script effectively does the same thing).

Fixes #474
joshbolduc added a commit that referenced this issue Jul 16, 2022
Instead of scanning just the launched process for an opened port that
may be running a Storybook server, also check for opened ports by any
child processes. This allows support for wrapper scripts that indirectly
launch a Storybook server, as well as Windows support (where invoking a
`start-storybook.cmd` script effectively does the same thing).

Fixes #474
@joshbolduc
Copy link
Owner

Thanks for the report. I just released 0.6.1, which I believe will fix this issue without requiring any workarounds. Please let me know if that turns out not to be the case.

Incidentally, if you notice excessive memory consumption when you launch the on-demand server, make sure that you don't open the task output for the dev server while it's building. It's hidden by default, but while testing this out I noticed that, for some reason, memory usage would skyrocket if I opened it. I opened an issue with VS Code since I'm pretty sure it's an upstream bug (it repros even without the extension). But something to note, in case you encounter the same behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants