asyncapi / asyncapi-react

React component for rendering documentation from your specification in real-time in the browser. It also provides a WebComponent and bundle for Angular and Vue
https://asyncapi.github.io/asyncapi-react/
Apache License 2.0
167 stars 104 forks source link

Cannot build on linux: sh: 1: cross-env: not found. And when installing cross-env globally: Error: spawn postcss ENOENT #841

Open ghuser opened 7 months ago

ghuser commented 7 months ago

Description

I am trying to build the component. I have cloned he repository. switched to tag: v1.2.2 npm install

Expected result

npm install completes

Actual result

sh: 1: cross-env: not found

And when I try to install globally ( npm i -g cross-env ) I get:

> @asyncapi/react-component@1.2.2 build:styles:dev
> cross-env NODE_ENV=production postcss src/styles/default.css -o styles/default.css --verbose

node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: spawn postcss ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn postcss',
  path: 'postcss',
  spawnargs: [ 'src/styles/default.css', '-o', 'styles/default.css', '--verbose' ]
}

Steps to reproduce

Troubleshooting

github-actions[bot] commented 7 months ago

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

derberg commented 6 months ago

please confirm if the issue is still there in version 1.2.11

I see cross-env is added as dependency in library

ghuser commented 6 months ago

In v1.2.11 I had to install webpack with npm i -g webpack. Then after using npm i (node-modules cleaned and other changed files reverted) the process freezes in the following point:

image

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart: