Skip to content

Beta 32 AoT fails on Protractor typings #4865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
m4mbart opened this issue Feb 21, 2017 · 8 comments
Closed

Beta 32 AoT fails on Protractor typings #4865

m4mbart opened this issue Feb 21, 2017 · 8 comments

Comments

@m4mbart
Copy link

m4mbart commented Feb 21, 2017

When trying to make an AoT/prod build with Beta 32 I run into the following error:

ERROR in Error encountered resolving symbol values statically. Could not resolve events relative to /Users//node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts., resolving symbol WebDriverCommand in /Users//node_modules/blocking-proxy/built/lib/webdriver_commands.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users***/src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts

An issue has been made in the protractor repository about this. See:
See: angular/protractor#3375

It has something todo with Typescript 2.1

As a workaround I have removed protractor from the project for now. But this is of course not ideal.

OS?

Mac OSX

Versions.

@angular/cli: 1.0.0-beta.32.3 [1.0.0-beta.15]
node: 6.9.5
os: darwin x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 2.4.8

Repro steps.

ng build --prod --aot --env=dev --sm false --base-href="/app/"

@kieronqtran
Copy link

kieronqtran commented Feb 21, 2017

I have exact same the problem. After hours of trying, I found the temporary solution is very simple. Downgrade the protractor version to v4.0.14 or earlier.

@m4mbart
Copy link
Author

m4mbart commented Feb 21, 2017

4.0.14 could be the trick indeed. I first trying to downgrade to version 5.0. But that caused another "ERROR in Error encountered resolving symbol values statically". Something with 'Runner'

@kieronqtran
Copy link

I also have the same problem I'm trying use protractor version 5.0. This is my output when trying using v5.0:

ERROR in Error encountered resolving symbol values statically. Could not resolve events relative to /Users/username/project/node_modules/protractor/built/runner.d.ts., resolving symbol Runner in /Users/username/project/node_modules/protractor/built/runner.d.ts

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users/username/project/src'
 @ ./src/main.ts 5:0-74
 @ multi ./src/main.ts

and my current version of angular project:
@angular/cli: 1.0.0-beta.32.3 [1.0.0-beta.25.5]
node: 6.9.5
os: darwin x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/flex-layout: 2.0.0-beta.5
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 2.4.8

However, the fresh new generated with "ng new" project doesn't face the same problem when using ng build --aot command and protractor version 5.1.0. Therefore, I have no ideas how to replicate the bug for reporting. Furthermore, despite my effort on keeping current project with new changes in angular-cli, the bug on ng build with Aot doesn't go away. In my opinion, Protractor v5 is currently unstable, and using version 4 is the best solution.

@eilensm
Copy link

eilensm commented Feb 21, 2017

Also have the problem with protractor 5.1.0. Updated an existing project that ran before with beta.26.

Downgrading to protector 4.0.14 works, although there I have some problems with the webdriver-manager update command.

@eilensm
Copy link

eilensm commented Feb 21, 2017

I just had a look at a new plain vanilla cli project where the aot build works even with protractor 5.1.0. After thinking about possible differences to my "older" project I stumbled upon the fact, that in the new cli project, e2e-specs are only in the "e2e" folder whereas in my project, I had some e2e specs in the "src" folder. So I moved all my e2e specs into the e2e folder and now it works just fine.

@filipesilva
Copy link
Contributor

Fixed by #4924

@basst314
Copy link

I can confirm this issue, and also that @eilensm 's solution fixed it for me.
I also had one .e2e.ts file leftover in my /src directory which caused the error. Moving that file to the /e2e folder fixed it for me.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants