Skip to content

fix(build): fix path error when appConfig has no main - #3867

Merged
filipesilva merged 1 commit into
angular:masterfrom
filipesilva:no-main-no-fail
Jan 11, 2017
Merged

filipesilva merged 1 commit into
angular:masterfrom
filipesilva:no-main-no-fail

Conversation

@filipesilva

Copy link
Copy Markdown
Contributor

Fixes a path error when main is missing in angular-cli.json:

kamik@T460p MINGW64 /D/sandbox/master-proj
$ ng build

Path must be a string. Received undefined
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.resolve (path.js:184:7)
# ...

@hansl

hansl commented Jan 6, 2017

Copy link
Copy Markdown
Contributor

From what I understand this also allows people to use the CLI for apps that have no main at all, correct?

@filipesilva

Copy link
Copy Markdown
Contributor Author

@hansl yes, it will simply compile scripts and styles if there is no main. Was planning on using it to test the Angular ES5 examples on docs.

Comment thread tests/e2e/tests/misc/minimal-config.ts Outdated
}]
}),
}))
.then(() => ng('build'));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you verify that console.log('hello') is in the output? Alternatively, does ng serve still work? I'd rather test that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@filipesilva
filipesilva force-pushed the no-main-no-fail branch 2 times, most recently from f5251e3 to ec0a1df Compare January 11, 2017 12:57
@hansl

hansl commented Jan 11, 2017

Copy link
Copy Markdown
Contributor

LGTM.

@filipesilva
filipesilva merged commit 7bd165b into angular:master Jan 11, 2017
@filipesilva
filipesilva deleted the no-main-no-fail branch January 11, 2017 18:09
MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 11, 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

Successfully merging this pull request may close these issues.

3 participants