Skip to content

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

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

Merged
merged 1 commit into from
Jan 11, 2017

Conversation

filipesilva
Copy link
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
Copy link
Contributor

hansl commented Jan 6, 2017

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

@filipesilva
Copy link
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.

scripts: ['./script.js']
}]
}),
}))
.then(() => ng('build'));
Copy link
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
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
Copy link
Contributor

hansl commented Jan 11, 2017

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

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