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

cross-env: not found #151

Closed
briggySmalls opened this issue Feb 16, 2021 · 4 comments · Fixed by #153
Closed

cross-env: not found #151

briggySmalls opened this issue Feb 16, 2021 · 4 comments · Fixed by #153
Labels
bug Something isn't working

Comments

@briggySmalls
Copy link

Describe the bug

cross-env is not installed as a dependency of @asyncapi/html-template, nor is it listed as a peer dependency or anything like that.

We've been using the asyncapi/generator image with the @asyncapi/html-template in our CI pipeline for some time.

The command we execute is:

ag -o path/to/output/dir ./path/to/spec.yml @asyncapi/html-template

Today it started failing with:

> @asyncapi/[email protected] generate:atomcss /usr/local/lib/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template
> cross-env NODE_ENV=production postcss template/css/atom-one-dark.min.css -o template/css/main.min.css

sh: cross-env: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @asyncapi/[email protected] generate:atomcss: `cross-env NODE_ENV=production postcss template/css/atom-one-dark.min.css -o template/css/main.min.css`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @asyncapi/[email protected] generate:atomcss script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-02-16T10_31_46_618Z-debug.log
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Something went wrong:
Error: @asyncapi/[email protected] postinstall: `rimraf "template/css/main.min.css" && npm run generate:atomcss && npm run generate:maincss && npm run generate:tailwind.css`
Exit status 1
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
    at EventEmitter.emit (events.js:315:20)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)

How to Reproduce

docker run --rm -it --entrypoint="" asyncapi/generator npm i -g @asyncapi/html-template

Expected behavior

When using @asyncapi/html-template as a paramter to ag for the command to succeed.

@briggySmalls briggySmalls added the bug Something isn't working label Feb 16, 2021
@github-actions
Copy link

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
Copy link
Member

derberg commented Feb 16, 2021

This is how you learn you have users 😭
sorry folks, PR opened already

@briggySmalls
Copy link
Author

Thanks for your speedy fix! And thanks for the project, we really value it on my project :)

@derberg
Copy link
Member

derberg commented Feb 16, 2021

@briggySmalls thanks a lot for pointing out the problem and yeah, still liking us even though we caused the failure 🙇🏼

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