Error running the example
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.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 ]
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/
but in case anybody encounters the same
many thanks for your post - it helped me a lot!