You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
I downloaded the source code and figured out it was in Typescript format. So I installed Node.js and use ndm to install the Typescript compiler. I then tried running "tsc" in the smartthings-cli directory but it complained about a lot. I'm way out of my familiarity league here so it's at this point I pause and ask here for guidance.
scott@FreeBSD-VM:/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1 $ tsc
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/__tests__/test-lib/mock-command.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/__tests__/test-lib/mock-command.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/__tests__/test-lib/simple-type.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/__tests__/test-lib/simple-type.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/format.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/format.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/input-builder.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/input-builder.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/input.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/input.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/io-util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/io-util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/array.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/array.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/command-helpers.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/command-helpers.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/defs.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/defs.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/index.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/index.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/item-input/object.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/item-input/object.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/listing-io.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/listing-io.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/login-authenticator.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/login-authenticator.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/output-builder.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/output-builder.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/output.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/output.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/select.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/select.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/smartthings-command.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/smartthings-command.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/sse-command.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/sse-command.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/sse-io.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/sse-io.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/sse-util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/sse-util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/table-generator.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/table-generator.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/user-query.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/user-query.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
error TS6305: Output file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/dist/validate-util.d.ts' has not been built from source file '/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib/src/validate-util.ts'.
The file is in the program because:
Matched by default include pattern '**/*'
Found 24 errors.
scott@FreeBSD-VM:/usr/home/scott/Downloads/smartthings-cli--smartthings-cli-1.8.1/packages/lib $ tsc
src/__tests__/select.test.ts:56:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
Type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object> & Naming & CustomCommonListOutputProducer<object>'.
Type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object>'.
Types of property 'primaryKeyName' are incompatible.
Type 'string' is not assignable to type 'never'.
56 expect(await promptUser(command, config, { listItems })).toBe('chosen-id')
~~~~~~
src/__tests__/select.test.ts:77:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
77 expect(await promptUser(command, config, { listItems })).toBe('chosen-id')
~~~~~~
src/__tests__/select.test.ts:90:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
90 expect(await promptUser(command, config, { listItems, autoChoose: true })).toBe('string-id-1')
~~~~~~
src/__tests__/select.test.ts:103:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
103 await expect(selectFromList(command, config, { listItems })).rejects.toThrow('should exit')
~~~~~~
src/__tests__/select.test.ts:116:37 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
116 expect(await promptUser(command, config, { listItems, getIdFromUser })).toBe('special-id')
~~~~~~
src/__tests__/select.test.ts:131:41 - error TS2345: Argument of type '{ itemName: string; tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
Type '{ itemName: string; tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object> & Naming & CustomCommonListOutputProducer<object>'.
Type '{ itemName: string; tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to type 'Sorting<object>'.
Types of property 'primaryKeyName' are incompatible.
Type 'string' is not assignable to type 'never'.
131 expect(await selectFromList(command, configWithName, { listItems })).toBe('chosen-id')
~~~~~~~~~~~~~~
src/__tests__/select.test.ts:143:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
143 expect(await selectFromList(command, config, { listItems, promptMessage: 'custom prompt' }))
~~~~~~
src/__tests__/select.test.ts:167:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
167 expect(await selectFromList(command, config, { preselectedId: 'sample-id', listItems }))
~~~~~~
src/__tests__/select.test.ts:183:41 - error TS2345: Argument of type '{ tableFieldDefinitions: never[]; primaryKeyName: string; sortKeyName: string; }' is not assignable to parameter of type 'SelectFromListConfig<object>'.
183 expect(await selectFromList(command, config, { listItems }))
~~~~~~
Found 9 errors in the same file, starting at: src/__tests__/select.test.ts:56
I dont think this is a FreeBSD issue. I know we got alot of problems with things that runs with electron.
Also in your output, the errors seens about test files. Also, the readme of the project just recomments you to download the binarie and runs it as installation method for (li)unix, so why you dont do that?
If it is really a need to run it with js/ts, why did you just used tsc? For what I know about js/ts apps you should use npm/yarn/etc alikes.
Something like:
npm install
to install node_modules with all dependencies and then npm run *something*
usually, the scripts in
package.json
BUT I dont know what smarthings-cli is and how it works, also I find odd that there are no build instructions on the readme.
You can try npm install and npm run etc to see if you get something, but again, just a shot.
Also, I think you would have more chances to find help openning a issue in the given repo than here.
EDIT:
I peeaked the repo a little, and there is a CONTRIBUTING.md that tells you what to do:
Well, look at you... I post what I thought was a hard question, and you immediately come back with no one but
two
methods that work just fine. I got the Linux layer working before your edit, then saw your edit (good catch!) and tried that and successfully got a native FreeBSD binary working.
Thanks a ton!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…