DeborahK/Angular-ReactiveForms

You seem to not be depending on "@angular/core" and/or "rxjs". This is an error

Closed this issue · 4 comments

Hi,
I was trying to install new version of this project in new folder structure in my PC and I have
npm --version : 4.4.4 && angular-cli global: "6.0.3" && Git vresion 2.17.0
and to save some volume in my machine, I copied package.json & package-lock.,json to the root folder where the project "Angular-ReactiveForms" downloaded and then run command "npm i" to install the node-modules so I can reference it in all other projects.
now after getting into APM-Updated folder and run command "ng serve" or "ng Build" I get the error:
"You seem to not be depending on "@angular/core" and/or "rxjs". This is an error"

Appreciate your help on this error,

more on this: I ran e2e on the root of APM-Updated project and it compiled successfully and the browser gets launched and Jasmine started and then browser terminated with error on the console
" workspace-project App
× should display welcome message
- Failed: No element found using locator: By(css selector, pm-root h1)"
......

Executed 1 of 1 spec (1 FAILED) in 2 secs.
[11:30:16] I/launcher - 0 instance(s) of WebDriver still running
[11:30:16] I/launcher - chrome #1 failed 1 test(s)
[11:30:16] I/launcher - overall: 1 failed spec(s)
[11:30:16] E/launcher - Process exited with error code 1
An unexpected error occurred: undefined

I'm on holiday in new Zealand and will look at your issue when I return.

But with just a quick look you may not have a new enough version of npm. Could you try updating it?

Is the code below considered a safe way to upgrade npm in windows?

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade

Personally, I uninstall node using the Windows add/remove programs and then reinstall it. I've never tried the technique you specified above.

Also note that both the unit tests and end to end tests are generated when a new Angular project or component/service is created. These ONLY RUN SUCCESSFULLY when the project is new. As soon as we add code to the project, the tests will NO LONGER run successfully (unless we of course update the tests for the updated code).

This course did not include information on Angular testing and therefore did not include code to update the tests with the code we added. That is why the tests don't run successfully.