help icon indicating copy to clipboard operation
help copied to clipboard

An accessor cannot be declared in an ambient context.

Open jayjupdhig opened this issue 4 years ago • 5 comments

Hi there!!

I try to build an ngx-admin-based angular web app that was created by one of your former employee. The time he has developed that project was from March 2019 to April 2019.

So i think he used Node.JS v10.x.

And, so i saw, the 10.x Version of NodeJS is still supported & developed, last version is from October 2020: https://nodejs.org/en/download/releases/

And that's the version i tried to build with - without any success.

My steps:

Before uninstalling the current version (it tried ALL of them, not just v10.x -> v11.x, v12.x, v13.x, v14.x, v15.x), i genereally execute that windows batches:

all.bat:

@echo on

call clean_before_uninstall.bat
call npm_uninstall.bat

runas /profile /savecred /env /user:WORKGROUP\user1 "C:\Tools\NPM_clean\clean_after_uninstall.bat"

clean_before_uninstall.bat

@echo on
cls

@echo off
rem call npm_function.bat npm uninstall cordova-plugin-build-architecture
rem timeout /T 2 /nobreak > nul 2>&1

rem call npm_function.bat npm uninstall -g native-run
rem timeout /T 2 /nobreak > nul 2>&1

rem call npm_function.bat npm uninstall -g cordova
rem timeout /T 2 /nobreak > nul 2>&1

rem call npm_function.bat npm uninstall -g @ionic/cli
rem timeout /T 2 /nobreak > nul 2>&1
@echo on


call npm_function.bat npm cache clean --force > nul 2>&1
timeout /T 2 /nobreak > nul 2>&1

call npm_function.bat npm uninstall -g windows-build-tools > nul 2>&1
timeout /T 2 /nobreak > nul 2>&1

call npm_function.bat npm uninstall -g @angular/cli > nul 2>&1
timeout /T 2 /nobreak > nul 2>&1

call delete_npm_directories.bat

delete_npm_directories.bat:

@echo on

rd /s /q "C:\Users\%USERNAME%\AppData\Roaming\npm" > nul 2>&1
timeout /T 2 /nobreak > nul 2>&1

rd /s /q "C:\Users\%USERNAME%\AppData\Roaming\npm-cache" > nul 2>&1
timeout /T 2 /nobreak > nul 2>&1

del /f /q "C:\Users\%USERNAME%\AppData\Local\Temp\npm-*" > nul 2>&1

if exist "C:\Users\%USERNAME%\.windows-build-tools" (
  timeout /T 2 /nobreak > nul 2>&1
  rd /s /q "C:\Users\%USERNAME%\.windows-build-tools" > nul 2>&1
)

pause

npm_uninstall.bat (depends what version is installed), which uninstalls node.js:

@echo on

MsiExec.exe /i {43342FBE-702A-4921-B19C-131087A3264B} > nul 2>&1
MsiExec.exe /i {86D77F05-3A56-4240-B704-128C4B5E73FD} > nul 2>&1
MsiExec.exe /i {6483D1C8-84CF-4BDE-8CFA-F1B11D7FE1E6} > nul 2>&1

pause

after node.js uninstall, i also run clean_after_uninstall.bat:

@echo on
cls

del /f /q /s "C:\Program Files\nodejs\*.*" > nul 2>&1
timeout /T 2 /nobreak > nul 2>&1

rmdir /q /s "C:\Program Files\nodejs" > nul 2>&1

pause

Then i installed many different NodeJS versions (almost everything, as already said).

After that i do that standard steps:

1.) npm install -g npm
2.) npm install -g @angular/cli
3.) cd PROJECT_FOLDER
4.) npm install
5.) ng build

Then i get that errors in red font in console:

1.) ERROR in node_modules/ng2-ckeditor/ckeditor.component.d.ts(34,9): error TS1086: An accessor cannot be declared in an ambient context. 2.) node_modules/ng2-ckeditor/ckeditor.component.d.ts(35,9): error TS1086: An accessor cannot be declared in an ambient context.

Thank you for your feedbacks.

I just want to change a (one) resource text entry - but i'm on that issue since monday. Now, it's firday and my chief gets insane soon...

Thank you for your feedbacks.

With best regards from Switzerland, Jan

jayjupdhig avatar Nov 13 '20 11:11 jayjupdhig

No anwser??

jayjupdhig avatar Nov 20 '20 13:11 jayjupdhig

???

jayjupdhig avatar Nov 23 '20 09:11 jayjupdhig

Question is still pendent - so thanks in advance for any feedbacks...

jayjupdhig avatar Mar 15 '21 00:03 jayjupdhig

Hello...?!?

jayjupdhig avatar May 25 '21 08:05 jayjupdhig

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.

github-actions[bot] avatar May 11 '24 01:05 github-actions[bot]

It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.

github-actions[bot] avatar Jun 10 '24 01:06 github-actions[bot]