-
Notifications
You must be signed in to change notification settings - Fork 12k
ng build -w does not work #2409
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
Comments
I'm new to this project, but it looks like commandOptions.outputPath is getting removed somewhere along the way. I'm able to work around it in the meantime by explicitly setting the output-path flag: ng build --w --output-path="dist" |
This is the line in the file build-webpack-watch.js where the error occurs: rimraf.sync(path.resolve(project.root, runTaskOptions.outputPath)); In the file build-webpack we can see that the outputPath is set to the outDir of the angular-cli.json: var outputDir = runTaskOptions.outputPath || config_1.CliConfig.fromProject().config.apps[0].outDir; So to fix this issue just add these three lines of code to build-webpack-watch.js: var config_1 = require('../models/config');
...
var outputDir = runTaskOptions.outputPath || config_1.CliConfig.fromProject().config.apps[0].outDir;
rimraf.sync(path.resolve(project.root, outputDir)); |
Dupe of #2006 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Versions.
$ ng build -w
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
Path must be a string. Received null
TypeError: Path must be a string. Received null
at assertPath (path.js:7:11)
at Object.resolve (path.js:1148:7)
at Class.run (/Users/goriunov/Desktop/GitHub Repos/multiplayr-game/front-end/node_modules/angular-cli/tasks/build-webpack-watch.js:14:26)
at Class.run (/Users/goriunov/Desktop/GitHub Repos/multiplayr-game/front-end/node_modules/angular-cli/commands/build.js:50:26)
at Class. (/Users/goriunov/Desktop/GitHub Repos/multiplayr-game/front-end/node_modules/angular-cli/lib/models/command.js:152:17)
at tryCatch (/Users/goriunov/Desktop/GitHub Repos/multiplayr-game/front-end/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
at invokeCallback (/Users/goriunov/Desktop/GitHub Repos/multiplayr-game/front-end/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
at publish (/Users/goriunov/Desktop/GitHub Repos/multiplayr-game/front-end/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:7)
at flush (/Users/goriunov/Desktop/GitHub Repos/multiplayr-game/front-end/node_modules/rsvp/dist/lib/rsvp/asap.js:82:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
The text was updated successfully, but these errors were encountered: