You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ERROR when using 'ng serve' with a ./config/environment.js path #3531
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
No. This app was created using the CLI.
I added a 'config' directory to the root of my application with an 'environment.js' file inside. I use this file from 'server.js' to set env variable in my express app.
The log given by the failure.
Normally this include a stack trace and some more information.
C:\Users\brand\Desktop\projects\ng2-skeleton-node>ng serve
app.set is not a function
TypeError: app.set is not a function
at module.exports.app (C:\Users\brand\Desktop\projects\ng2-skeleton-node\config\environment.js:2:7)
at Project.config (C:\Users\brand\Desktop\projects\ng2-skeleton-node\node_modules\angular-cli\angular-cli\lib\models\project.js:198:52)
at C:\Users\brand\Desktop\projects\ng2-skeleton-node\node_modules\angular-cli\commands\serve.js:95:40
at process._tickCallback (internal/process/next_tick.js:103:7)
Mention any other details that might be useful.
I renamed folder to 'configuration' and updated my references; this corrected the issue.
changed the title [-]ERROR when using 'ng serve' with a ./config/environment.js file[/-][+]ERROR when using 'ng serve' with a ./config/environment.js path[/+]on Dec 12, 2016
Activity
[-]ERROR when using 'ng serve' with a ./config/environment.js file[/-][+]ERROR when using 'ng serve' with a ./config/environment.js path[/+]filipesilva commentedon Dec 30, 2016
This sounds like some logic leftover from
ember-clithat we do not use.If someone wants to look at it, it's probably here somewhere:
https://github.com/angular/angular-cli/blob/master/packages/angular-cli/ember-cli/lib/models/project.js
There was some recent refactoring done in the forked ember code so this might or might not happen in the latest releases.
aviramga commentedon Feb 15, 2017
@bdphil86 it looks like this issue was resolved by @gelliott181 so probably updating to the latest cli version would fix it.
#goodnessSquad
hansl commentedon Feb 25, 2017
Thanks @aviramga. Closing this. If someone still has this issue on the latest release please open a new issue.
angular-automatic-lock-bot commentedon Sep 6, 2019
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.