nativescript-toolbox
nativescript-toolbox copied to clipboard
Failed at the [email protected] postinstall script 'tsc'.
When I update NativeScript from v3.0.3 to 3.1.1 I got error ...
Failed at the [email protected] postinstall script 'tsc'. Make sure you have the latest version of node.js and npm installed.
but I have node v7.6.0 and npm v4.1.2 ... So How to solve it ?
I try node v7.10.0 and npm v5.1.0 and still problem ...
I have the same problem with Nativescript 3.1.2
After remove platform, update everthing ... not use tns udpate
, but npm install nativescript
... it is working ... i dont know where is problem ... i cant use tns update
, but trough npm
it is ok ...
@LeopoldPodmolik I tried what you suggested but I'm still getting the error. Im running node 6.11.0 npm 5.3.0 and {N} 3.1.3
sh: tsc: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: tsc
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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! /**********/2017-08-22T08_35_25_035Z-debug.log Command npm install nativescript-toolbox --save failed with exit code 1
FWIW, I just encountered this and was able to resolve it by updating NativeScript and installing TypeScript globally.
I have the same issue
npm install nativescript-toolbox
or tns plugin add nativescript-toolbox
get the error:
> tsc
../../app/alerts/charts/alerts-charts.ts(54,47): error TS2339: Property 'getElementsByClassName' does not exist on type
'Page'.
../../app/alerts/charts/alerts-charts.ts(76,46): error TS2339: Property 'getElementById' does not exist on type 'Page'.
../../app/shared/utils.ts(8,24): error TS2307: Cannot find module 'nativescript-toast'.
apiclient/index.d.ts(55,27): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
apiclient/index.d.ts(103,27): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
apiclient/index.d.ts(123,27): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
apiclient/index.d.ts(289,42): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
apiclient/index.d.ts(685,30): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
apiclient/index.d.ts(853,19): error TS2694: Namespace '"http"' has no exported member 'Headers'.
apiclient/index.d.ts(897,20): error TS2694: Namespace '"http"' has no exported member 'HttpResponse'.
apiclient/index.d.ts(908,27): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
apiclient/index.d.ts(1260,27): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
apiclient/index.d.ts(1297,27): error TS2694: Namespace '"http"' has no exported member 'HttpRequestOptions'.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\nativescript\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Nothing helps...
Just updated nativescript to 4.0.0 and am getting the following error. Any solutions to this?
1145 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin 1145 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any 1145 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux 1145 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64 1146 verbose stack Error: [email protected] postinstall:
tsc1146 verbose stack Exit status 1 1146 verbose stack at EventEmitter.<anonymous> (/home/bear/.nvm/versions/node/v8.9.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16) 1146 verbose stack at emitTwo (events.js:126:13) 1146 verbose stack at EventEmitter.emit (events.js:214:7) 1146 verbose stack at ChildProcess.<anonymous> (/home/bear/.nvm/versions/node/v8.9.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 1146 verbose stack at emitTwo (events.js:126:13) 1146 verbose stack at ChildProcess.emit (events.js:214:7) 1146 verbose stack at maybeClose (internal/child_process.js:925:16) 1146 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 1147 verbose pkgid [email protected] 1148 verbose cwd /home/bear/dev/app90dr 1149 verbose Linux 4.13.0-39-generic 1150 verbose argv "/home/bear/.nvm/versions/node/v8.9.0/bin/node" "/home/bear/.nvm/versions/node/v8.9.0/bin/npm" "install" "nativescript-toolbox" "--save" 1151 verbose node v8.9.0 1152 verbose npm v5.8.0 1153 error code ELIFECYCLE 1154 error errno 1 1155 error [email protected] postinstall:
tsc`
1155 error Exit status 1
1156 error Failed at the [email protected] postinstall script.
1156 error This is probably not a problem with npm. There is likely additional logging output above.
1157 verbose exit [ 1, true ]
`
same problem here.
So this hasn't been figured out yet? same issue here on nativescript 6.0.2
Same Here:
##[debug]INPUT_SCRIPT: 'tns install --release'
Generating script.
##[debug]AGENT_VERSION: '2.160.0'
##[debug]AGENT_TEMPDIRECTORY: 'd:\a\_temp'
##[debug]Asserting container path exists: 'd:\a\_temp'
##[debug]Asserting leaf path exists: 'C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe'
========================== Starting Command Output ===========================
##[debug]Entering Invoke-VstsTool.
##[debug] Arguments: '-NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'd:\a\_temp\0f41a969-96cc-4f5c-8757-8bdd1ad3b9aa.ps1'"'
##[debug] FileName: 'C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe'
##[debug] WorkingDirectory: 'd:\a\1\s'
##[command]"C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'd:\a\_temp\0f41a969-96cc-4f5c-8757-8bdd1ad3b9aa.ps1'"
Command npm.cmd failed with exit code 1 Error output:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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! C:\npm\cache\_logs\2019-11-12T00_32_51_192Z-debug.log
##[debug]$LASTEXITCODE: 127
##[debug]Exit code: 1
##[debug]Leaving Invoke-VstsTool.
##[error]PowerShell exited with code '1'
Try and run tsc
on its own, you may have some errors in your project.
In my case I was trying to install nativescript-toolbox whilst I had some bad code (I removed a library then immediately tried to install nativescript-toolbox).
Fixing my code then re-running the install worked for me.