haier-ac-remote icon indicating copy to clipboard operation
haier-ac-remote copied to clipboard

Error running the example

Open albetaCOM opened this issue 5 years ago • 2 comments

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

[email protected] 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! [email protected] 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 [email protected] 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 [email protected] 3 info using [email protected] 4 verbose run-script [ 'preexample', 'example', 'postexample' ] 5 info lifecycle [email protected]~preexample: [email protected] 6 info lifecycle [email protected]~example: [email protected] 7 verbose lifecycle [email protected]~example: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~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 [email protected]~example: CWD: /home/alba/haier-ac-remote/packages/haier-ac-remote 10 silly lifecycle [email protected]~example: Args: [ '-c', 10 silly lifecycle 'rm -rf ./dist/ && ../../node_modules/.bin/tsc --project ./tsconfig.json && npm run run:example' ] 11 info lifecycle [email protected]~example: Failed to exec example script 12 verbose stack Error: [email protected] 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 [email protected] 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 [email protected] example: rm -rf ./dist/ && ../../node_modules/.bin/tsc --project ./tsconfig.json && npm run run:example 23 error spawn ENOENT 24 error Failed at the [email protected] example script. 24 error This is probably not a problem with npm. There is likely additional logging output above. 25 verbose exit [ 1, true ]

albetaCOM avatar Jul 19 '20 15:07 albetaCOM

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/"

Omniptizator avatar Dec 07 '21 17:12 Omniptizator

but in case anybody encounters the same

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

and7ey avatar Jan 24 '23 20:01 and7ey