Skip to content

Commit 5beb8a6

Browse files
committed
workaround for: can't resolve module @angular/core/src/di/opaque_token from [project-dir]\src\index.ts
1 parent 130dbf4 commit 5beb8a6

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ But by design, the command is limited to the `gh-pages` branch of the same repos
1818
In contrast to this, the [angular-buch/angular-cli-ghpages](https://github.com/angular-buch/angular-cli-ghpages) addon is able to push to any branch on any repository. It's made on top of [tschaub/gh-pages](https://github.com/tschaub/gh-pages).
1919
__This addon works great on [Travis-CI](https://travis-ci.org/).__ No git credentials must be set up in before. Specific environment variables of Travis-CI are evaluated, too. You will like it!
2020

21-
angular-cli-ghpages was sucessfully tested against __`angular-cli: 1.0.0-beta.21`__.
21+
angular-cli-ghpages was sucessfully tested against __`angular-cli@1.0.0-beta.22-1`__.
2222

2323

2424
## Installation & Setup

deploy.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
var path = require('path'),
44
fs = require('fs'),
5-
ghpages = require('gh-pages'),
5+
// If we require the gh-pages package on top, then the `ng build` is completely screwed, see below!
6+
// ghpages = require('gh-pages')
67
denodeify = require('denodeify');
78

89
module.exports = {
@@ -54,6 +55,19 @@ module.exports = {
5455
}],
5556
run: function(options, rawArgs) {
5657

58+
/*
59+
If we require the gh-pages package on top, then the `ng build` is completely screwed:
60+
61+
> can't resolve module @angular/core/src/di/opaque_token from [project-dir]\src\index.ts
62+
> symbol.getDeclarations is not a function
63+
> TypeError: symbol.getDeclarations is not a function
64+
65+
I have no clue why this happens but this late require works around the problem.
66+
This issue started to occur with [email protected].
67+
*/
68+
var ghpages = require('gh-pages');
69+
70+
5771
var ui = this.ui;
5872
var root = this.project.root;
5973
var dir = path.join(root, options.dir);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-cli-ghpages",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Angular CLI addon. Publish to any gh-pages branch on GitHub (or any other branch on any other remote).",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)