bstuff / haier-ac-remote

70 stars 15 forks source link

Error running the example #15

Open albetaCOM opened 3 years ago

albetaCOM commented 3 years ago

I get error when running the example (I've tried both on windows and on linux).

Here is the Log: alba@DESKTOP-LUBT0FV:~/haier-ac-remote/packages/haier-ac-remote$ /usr/bin/npm run example

haier-ac-remote@0.1.2 example /home/alba/haier-ac-remote/packages/haier-ac-remote rm -rf ./dist/ && ../../node_modules/.bin/tsc --project ./tsconfig.json && npm run run:example

sh: 1: ../../node_modules/.bin/tsc: not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! haier-ac-remote@0.1.2 example: rm -rf ./dist/ && ../../node_modules/.bin/tsc --project ./tsconfig.json && npm run run:example npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the haier-ac-remote@0.1.2 example script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/alba/.npm/_logs/2020-07-19T15_10_25_375Z-debug.log alba@DESKTOP-LUBT0FV:~/haier-ac-remote/packages/haier-ac-remote$ cat /home/alba/.npm/_logs/2020-07-19T15_10_25_375Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'example' ] 2 info using npm@6.14.4 3 info using node@v10.19.0 4 verbose run-script [ 'preexample', 'example', 'postexample' ] 5 info lifecycle haier-ac-remote@0.1.2~preexample: haier-ac-remote@0.1.2 6 info lifecycle haier-ac-remote@0.1.2~example: haier-ac-remote@0.1.2 7 verbose lifecycle haier-ac-remote@0.1.2~example: unsafe-perm in lifecycle true 8 verbose lifecycle haier-ac-remote@0.1.2~example: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/alba/haier-ac-remote/packages/haier-ac-remote/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files/nodejs/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/AutoFirma/AutoFirma:/mnt/c/Program Files/dotnet/:/mnt/c/Users/albap/AppData/Local/Programs/Python/Python37/Scripts/:/mnt/c/Users/albap/AppData/Local/Programs/Python/Python37/:/mnt/c/Users/albap/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/albap/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/albap/AppData/Roaming/npm:/mnt/c/Users/albap/.dotnet/tools:/snap/bin 9 verbose lifecycle haier-ac-remote@0.1.2~example: CWD: /home/alba/haier-ac-remote/packages/haier-ac-remote 10 silly lifecycle haier-ac-remote@0.1.2~example: Args: [ '-c', 10 silly lifecycle 'rm -rf ./dist/ && ../../node_modules/.bin/tsc --project ./tsconfig.json && npm run run:example' ] 11 info lifecycle haier-ac-remote@0.1.2~example: Failed to exec example script 12 verbose stack Error: haier-ac-remote@0.1.2 example: rm -rf ./dist/ && ../../node_modules/.bin/tsc --project ./tsconfig.json && npm run run:example 12 verbose stack spawn ENOENT 12 verbose stack at ChildProcess. (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18) 12 verbose stack at ChildProcess.emit (events.js:198:13) 12 verbose stack at maybeClose (internal/child_process.js:982:16) 12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) 13 verbose pkgid haier-ac-remote@0.1.2 14 verbose cwd /home/alba/haier-ac-remote/packages/haier-ac-remote 15 verbose Linux 4.4.0-18362-Microsoft 16 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "example" 17 verbose node v10.19.0 18 verbose npm v6.14.4 19 error code ELIFECYCLE 20 error syscall spawn 21 error file sh 22 error errno ENOENT 23 error haier-ac-remote@0.1.2 example: rm -rf ./dist/ && ../../node_modules/.bin/tsc --project ./tsconfig.json && npm run run:example 23 error spawn ENOENT 24 error Failed at the haier-ac-remote@0.1.2 example script. 24 error This is probably not a problem with npm. There is likely additional logging output above. 25 verbose exit [ 1, true ]

Omniptizator commented 2 years ago

I realize that probably this question does not interest original poster, but in case anybody encounters the same - readme file does not state, that npm install Should be ran in root directory of the project, not inside "packages/"

and7ey commented 1 year ago

but in case anybody encounters the same

many thanks for your post - it helped me a lot!