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 #102

Open
s1mrankaur opened this issue Mar 24, 2021 · 1 comment

Comments

@s1mrankaur
Copy link

    $ npm run deploy:local
    
    > [email protected] deploy:local
    > eval "`aws-auth-helper ` 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.

@jonknapp
Copy link
Member

I'm wondering if the terminal that's running is not bash. I checked the following in a recent node version (15.12.0) with npm (7.6.3) and it seemed to have eval available.

"scripts": {
  "eval_test": "eval \"echo hi\""
}

Could try the following script command to see what process / shell is running?

"scripts": {
  "eval_test": "eval \"echo test_process=$0 test_shell_path=$SHELL\""
}

You'd run it with npm run eval_test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants