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

'eval' is not recognized as an internal or external command, operable program or batch file on windows npm script #2953

Closed
s1mrankaur opened this issue Mar 24, 2021 · 2 comments
Assignees
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@s1mrankaur
Copy link

s1mrankaur commented Mar 24, 2021

  $ npm run deploy:local
   
   > backend@0.1.0 deploy:local
   > eval "`aws-auth-helper vn-sandbox` lerna run deploy:sandbox --stream"
   
   'eval' is not recognized as an internal or external command,
   operable program or batch file.

Node version:

$ node --version
v15.11.0
NPM version:

$ npm --version
7.6.0

I am using VSCode Bash terminal. It had been working just fine but then I started getting this error. Have tried both the bash terminal and javascript terminal.

If I just type "eval" in the bash terminal, it works okay. While running through npm script it does not.

@s1mrankaur s1mrankaur added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Mar 24, 2021
@nlf
Copy link
Contributor

nlf commented Mar 25, 2021

if you're running in Windows, the default shell we use to run scripts with is cmd.exe which does not have an eval. you can override this to use bash by running npm config set script-shell=bash

let me know if that works for you. admittedly there's an opportunity for a bit of enhancement here where we could potentially default to the currently running shell instead of an operating system specific one, but that's something we would have to take through our RFC process detailed here: https://github.com/npm/rfcs

@nlf nlf removed the Needs Triage needs review for next steps label Mar 25, 2021
@nlf nlf self-assigned this Mar 25, 2021
@s1mrankaur
Copy link
Author

That really worked! THANK YOU!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants