FGF-College-Work / Forum

:beer: Espaço dedicado a discussões e tira dúvida sobre disciplinas e conteúdo tecnológico.
MIT License
13 stars 4 forks source link

ERROR in node_modules/survey-angular/survey.angular.d.ts(663,14): error TS2304: Cannot find name 'KnockoutObservabl #165

Open marcialwushu opened 5 years ago

marcialwushu commented 5 years ago

ERROR in node_modules/survey-angular/survey.angular.d.ts(663,14): error TS2304: Cannot find name 'KnockoutObservabl

ERROR in node_modules/survey-angular/survey.angular.d.ts(663,14): error TS2304: Cannot find name 'KnockoutObservable'.
node_modules/survey-angular/survey.angular.d.ts(664,17): error TS2304: Cannot find name 'KnockoutComputed'.
node_modules/survey-angular/survey.angular.d.ts(665,13): error TS2304: Cannot find name 'KnockoutComputed'.
node_modules/survey-angular/survey.angular.d.ts(666,19): error TS2304: Cannot find name 'KnockoutObservable'.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-electron@0.0.0 electron: `ng build --base-href ./ && tsc --p electron && electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-electron@0.0.0 electron 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:\Users\USER_NAME\AppData\Roaming\npm-cache\_logs\2019-08-02T18_02_51_387Z-debug.log
marcialwushu commented 5 years ago

in src/polyfills.ts add

import * as ko from 'knockout'; window['knockout'] = ko;

It worked for me!!

marcialwushu commented 5 years ago

Can you try to remove the node_modules folder and reinstall packages via npm i?

marcialwushu commented 5 years ago

node_modules/@types/

marcialwushu commented 5 years ago

_log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\user_name\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'electron' ]
2 info using npm@6.10.2
3 info using node@v10.13.0
4 verbose run-script [ 'preelectron', 'electron', 'postelectron' ]
5 info lifecycle angular-electron@0.0.0~preelectron: angular-electron@0.0.0
6 info lifecycle angular-electron@0.0.0~electron: angular-electron@0.0.0
7 verbose lifecycle angular-electron@0.0.0~electron: unsafe-perm in lifecycle true
8 verbose lifecycle angular-electron@0.0.0~electron: PATH: C:\Users\user_name\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\user_name\Documents\Workspace\angular\AngularElectron\angular-electron\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Brackets\command;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Android\android-sdk;%ANDROID%\tools;C:\Program Files (x86)\WinMerge;C:\ProgramData\chocolatey\bin;C:\Program Files\doxygen\bin;C:\Program Files\Microsoft VS Code\bin;C:\src\flutter\bin;C:\Users\user_name\Documents\DSpace\apache-ant-1.10.5\bin;C:\Users\user_name\Documents\DSpace\apache-maven-3.5.4\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;%ANDROID%\platform-tools;C:\Ruby25-x64\bin;C:\Ruby24-x64\bin;C:\Users\user_name\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\carlosjunior\AppData\Local\Programs\Python\Python36\;C:\Program Files\Microsoft VS Code\bin;C:\Users\user_name\AppData\Local\Microsoft\WindowsApps;C:\src\flutter\bin;C:\Program Files\MongoDB\Server\4.0\bin;C:\Users\user_name\AppData\Roaming\npm;C:\Users\carlosjunior\AppData\Local\Yarn\bin;C:\Program Files (x86)\Android\android-sdk\platform-tools;C:\Users\user_name\AppData\Local\GitHubDesktop\bin
9 verbose lifecycle angular-electron@0.0.0~electron: CWD: C:\Users\user_name\Documents\Workspace\angular\AngularElectron\angular-electron
10 silly lifecycle angular-electron@0.0.0~electron: Args: [ '/d /s /c',
10 silly lifecycle   'ng build --base-href ./ && tsc --p electron && electron .' ]
11 silly lifecycle angular-electron@0.0.0~electron: Returned: code: 1  signal: null
12 info lifecycle angular-electron@0.0.0~electron: Failed to exec electron script
13 verbose stack Error: angular-electron@0.0.0 electron: `ng build --base-href ./ && tsc --p electron && electron .`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\user_name\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:326:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\user_name\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid angular-electron@0.0.0
15 verbose cwd C:\Users\user_name\Documents\Workspace\angular\AngularElectron\angular-electron
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user_name\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "electron"
18 verbose node v10.13.0
19 verbose npm  v6.10.2
20 error code ELIFECYCLE
21 error errno 1
22 error angular-electron@0.0.0 electron: `ng build --base-href ./ && tsc --p electron && electron .`
22 error Exit status 1
23 error Failed at the angular-electron@0.0.0 electron script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
marcialwushu commented 5 years ago

Looking through the commits on this repository I see that knockout needs to be added to the the types array in app/tsconfig.app.ts.