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
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Max OS X, although I imagine that's not relevant.
Versions. Please run ng --version. If there's nothing outputted, please run
in a Terminal: node --version and paste the result here:
1.0.0-beta.11-webpack.8
Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
If you run ng build --help, you see as one option:
If you then run this ng build --environment=production
you get "Path must be a string. Received undefined".
If you do ng build --environment=prod, it works. I'm assuming this is because there's an src/environments/environment.prod.ts file but not src/environments/environment.production.ts.
Seems like the help output should be corrected and you should get a friendlier error if you provide a bogus environment value.
The log given by the failure. Normally this include a stack trace and some
more information.
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:1148:7)
at Object.getWebpackCommonConfig (/Users/jasonswett/projects/scratch/foo/node_modules/angular-cli/addon/ng2/models/webpack-build-common.ts:128:80)
at new NgCliWebpackConfig (/Users/jasonswett/projects/scratch/foo/node_modules/angular-cli/addon/ng2/models/webpack-config.ts:13:30)
at Class.run (/Users/jasonswett/projects/scratch/foo/node_modules/angular-cli/addon/ng2/tasks/build-webpack.ts:16:22)
at Class.run (/Users/jasonswett/projects/scratch/foo/node_modules/angular-cli/addon/ng2/commands/build.ts:49:26)
at Class.<anonymous> (/Users/jasonswett/projects/scratch/foo/node_modules/angular-cli/lib/models/command.js:152:17)
at lib$rsvp$$internal$$tryCatch (/Users/jasonswett/projects/scratch/foo/node_modules/rsvp/dist/rsvp.js:1036:16)
at lib$rsvp$$internal$$invokeCallback (/Users/jasonswett/projects/scratch/foo/node_modules/rsvp/dist/rsvp.js:1048:17)
at lib$rsvp$$internal$$publish (/Users/jasonswett/projects/scratch/foo/node_modules/rsvp/dist/rsvp.js:1019:11)
at lib$rsvp$asap$$flush (/Users/jasonswett/projects/scratch/foo/node_modules/rsvp/dist/rsvp.js:1198:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Mention any other details that might be useful.
Thanks! We'll be in touch soon.
The text was updated successfully, but these errors were encountered:
Max OS X, although I imagine that's not relevant.
ng --version
. If there's nothing outputted, please runin a Terminal:
node --version
and paste the result here:1.0.0-beta.11-webpack.8
do on your code? etc.
If you run
ng build --help
, you see as one option:If you then run this
ng build --environment=production
you get "Path must be a string. Received undefined".
If you do
ng build --environment=prod
, it works. I'm assuming this is because there's ansrc/environments/environment.prod.ts
file but notsrc/environments/environment.production.ts
.Seems like the help output should be corrected and you should get a friendlier error if you provide a bogus environment value.
more information.
The text was updated successfully, but these errors were encountered: