TypeError: input.split is not a function
iva2k opened this issue · comments
Steps to reproduce
Performed the following steps:
npm i -g @feathers-plus/cli
# + @feathers-plus/cli@0.8.10
mkdir feathers-app
cd feathers-app
feathers-plus generate options
# chosen all defaults, except "Generate TypeScript code?" Yes
feathers-plus generate app
# chosen all defaults (npm is installed package manager)
Then I edited feathers-gen-spec.json file, and added "dev" and "test" environments:
"app": {
"environmentsAllowingSeedData": [
"dev",
"test"
],
...
Then re-run generate app:
feathers-plus generate app
# chosen all defaults
Expected behavior
Command should complete
Actual behavior
? Data mutating tests and seeding may run when NODE_ENV is one of (optional) (dev,test)
>> TypeError: input.split is not a function
Module versions (especially the part that's not working):
@feathers-plus/cli@0.8.10
NodeJS version:
tried both v11.4.0 and v8.11.2
Operating System:
Windows 7 64-bit
Further, the command hangs forever, so throwing this error does not terminate.
BTW, re-entering "dev,test" on that line helps to avoid the error (looks like generator does not allow "Enter" to just confirm. Should it?
I noticed that it re-writes ["dev", "test"] with "dev,test" in the feathers-gen-spec.json file. I tried re-running the "generate app" command with that setting and "Enter" does not throw that error.
However I still have "generate app" hanging (perhaps due to other changes I did to other files).
Update: I resolved the hanging part - I had some mix of npm/node install places. So wiping out node versions and nvm, removing npm from C:\users**, and reinstalling nvm in c:\nvm, and node in c:\node cleaned things quite nicely.