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

npx sb extract not working in docker with node 14 latest image #19459

Closed
srigar opened this issue Oct 12, 2022 · 1 comment
Closed

npx sb extract not working in docker with node 14 latest image #19459

srigar opened this issue Oct 12, 2022 · 1 comment

Comments

@srigar
Copy link

srigar commented Oct 12, 2022

Describe the bug
npx sb extract throwing error with node:14.20.0-alpine docker image and it is working fine in node v12.

12:29:04 + npx sb extract components components/stories.json. 12:29:11 npm WARN exec The following package was not found and will be installed: sb@6.5.12 12:31:02 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated 12:31:02 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated 12:31:02 npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated 12:31:02 npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated 12:31:02 npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. 12:31:02 npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies 12:31:02 info connecting to: http://localhost:46321/iframe.html 12:31:02 info installing puppeteer... 12:31:09 Error: Failed to launch the browser process! spawn /home/jenkins/.npm/_npx/d28cfb4b5495/node_modules/puppeteer-core/.local-chromium/linux-722234/chrome-linux/chrome ENOENT 12:31:09 12:31:09 12:31:09 TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md 12:31:09 12:31:09 at onClose (/home/jenkins/.npm/_npx/d28cfb4b5/node_modules/puppeteer-core/lib/Launcher.js:750:14) 12:31:09 at ChildProcess.<anonymous> (/home/jenkins/.npm/_npx/d28cfb4b5/node_modules/puppeteer-core/lib/Launcher.js:741:65) 12:31:09 at ChildProcess.emit (events.js:400:28) 12:31:09 at Process.ChildProcess._handle.onexit (internal/child_process.js:283:12) 12:31:09 at onErrorNT (internal/child_process.js:472:16) 12:31:09 at processTicksAndRejections (internal/process/task_queues.js:82:21)

To Reproduce

Try build the below docker file

Dockerfile

FROM node:14.20.0

ENV NODE_ENV production

WORKDIR /org/org-monorepo

COPY . .

RUN npx sb extract components components/stories.json

EXPOSE 8080

CMD npx serve components -p 8080

System
Environment Info:
System:
OS: Linux 4.18 Alpine Linux
CPU: (8) x64 Intel(R) Xeon(R) Gold 6252 CPU @ 2.10GHz
Binaries:
Node: 14.20.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 5.1.0 - /org/jenkins/workspace/lient-app-test/node_modules/.bin/npm
npmPackages:
@storybook/addon-a11y: ^6.3.2 => 6.4.8
@storybook/addon-actions: ^6.3.2 => 6.4.8
@storybook/addon-docs: ^6.3.2 => 6.4.8
@storybook/addon-info: ^5.3.21 => 5.3.21
@storybook/addon-jest: ^6.3.2 => 6.4.8
@storybook/addon-knobs: ^6.3.0 => 6.4.0
@storybook/addon-storysource: ^6.3.2 => 6.4.8
@storybook/addon-viewport: ^6.3.2 => 6.4.8
@storybook/react: ^6.3.2 => 6.4.8

Additional context
`bash-3.2$ docker build --rm -f "Dockerfile" -t org-client-app-test:latest .
[+] Building 380.7s (8/9)
[+] Building 381.0s (8/9)
[+] Building 512.0s (9/9) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 539B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for artifactory-local.docker.org.com/org-node-image:14.20.1 0.0s
=> [1/5] FROM d-frw-docker-local.docker.org.com/org-node-image:14.20.1 0.0s
=> [internal] load build context 0.2s
=> => transferring context: 87.79kB 0.2s
=> CACHED [2/5] RUN adduser --uid 10101 -S user 0.0s
=> CACHED [3/5] WORKDIR /org/org-monorepo 0.0s
=> [4/5] COPY . . 0.3s
=> ERROR [5/5] RUN npx sb extract components components/stories.json 511.3s

[5/5] RUN npx sb extract components components/stories.json:
#9 8.981 npm WARN exec The following package was not found and will be installed: sb@6.5.12
#9 419.5 npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
#9 419.7 npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
#9 420.0 npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
#9 420.0 npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
#9 421.6 npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
#9 441.5 npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
#9 477.8 info connecting to: http://localhost:35577/iframe.html
#9 477.8 info installing puppeteer...
#9 511.0 Error: Failed to launch the browser process! spawn /home/user/.npm/_npx/d28cfb4b5/node_modules/puppeteer-core/.local-chromium/linux-722234/chrome-linux/chrome ENOENT
#9 511.0
#9 511.0
#9 511.0 TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md
#9 511.0
#9 511.0 at onClose (/home/user/.npm/_npx/d28cfb4b5/node_modules/puppeteer-core/lib/Launcher.js:750:14)
#9 511.0 at ChildProcess. (/home/user/.npm/_npx/d28cfb4b5/node_modules/puppeteer-core/lib/Launcher.js:741:65)
#9 511.0 at ChildProcess.emit (events.js:400:28)
#9 511.0 at Process.ChildProcess._handle.onexit (internal/child_process.js:283:12)
#9 511.0 at onErrorNT (internal/child_process.js:472:16)
#9 511.0 at processTicksAndRejections (internal/process/task_queues.js:82:21)
executor failed running [/bin/sh -c npx sb extract components components/stories.json]: exit code: 1`

@vanessayuenn
Copy link
Contributor

In attempt to clean up old issue, I will be closing this one. We've made lots of improvements in Storybook since 7.0 so it's quite likely that this issue has been resolved already. If this is still a problem, please open a new issue with reproduction steps for 7.x version. Thank you!

@vanessayuenn vanessayuenn closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants