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
TypeError: undefined is not a function #9
Comments
Thank you for the report! I will dig this this evening (JST). |
Sorry for my delay. |
@mysticatea Awesome. Thank you! |
@mysticatea Why if a variable is not set do you set it to undefined instead of just leaving it alone? For example, if we have these two scripts. "cross-vars:echo": "cross-vars echo "Node Environment = $node_env \ NPM Production = $npm_config_production"", "cross-env:echo": "cross-env echo "Node Environment = $node_env \ NPM Production = $npm_config_production"", If NODE_ENV=production then both cross-env and cross-vars returns production. But if NODE_ENV doesn't exist then that's where there is a difference. With cross-env it just leaves it unset so there is no value in echo'd for node_env as we would expect. But with cross-vars it actually sets $NODE_ENV to "undefined". Now imagine you were actually calling and angular build with a script like this... "build": "cross-vars ng build --configuration=$node_env", If $node_env isn't set to anything, then instead of $node_env being literally undefined or set to nothing, cross-vars is setting it to the actual string "undefined". Having --configuration=undefined is going to cause the ng build to fail because there is no such thing as an "undefined" configuration environment. Why don't you just leave the variable value alone if it's undefined? |
First off, awesome package! Great work. It has been very helpful so far as I am transitioning to using npm scripts instead of Gulp/Grunt. I'm just running into one issue: when I run my
npm run dev
script, which usesnpm-run-all
I get aTypeError: undefined is not a function
error, which is preventing mylint:watch
script from running. I have done some debugging, and everything works as expected runningnpm run lint:watch
by itself, ornpm run dev
without thelint:watch
command...but I don't know how to debug it. Is this a known issue withnpm-run-all
?Related issue
I don't know if this is an issue with
eslint-watch
ornpm-run-all
, so I have posted the issue in both places. I do know that all of my other packages work as expected so something seems to be wrong with eithereslint-watch
ornpm-run-all
.rizowski/eslint-watch#28
Steps to reproduce:
npm install
npm run lint:watch
runs as expectednpm run dev
runsnpm-run-all
which works for everything except forlint:watch
which is outputtingTypeError: undefined is not a function
The text was updated successfully, but these errors were encountered: