There is no such file or directory error in the 'ng-build' command

I get the following error when trying to build a project using 'Angular-cli'


D:\workspace\migration-project>ng build
ENOENT: no such file or directory, stat 'D:\workspace\migration-project\src\assets'
Error: ENOENT: no such file or directory, stat 'D:\workspace\migration-project\src\assets'
    at Error (native)
    at Object.fs.statSync (fs.js:844:18)
    at D:\workspace\migration-project\node_modules\angular-cli\plugins\glob-copy-webpack-plugin.js:16:64
    at Array.map (native)
    at GlobCopyWebpackPlugin.apply (D:\workspace\migration-project\node_modules\angular-cli\plugins\glob-copy-webpack-plugin.js:16:29)
    at Compiler.apply (D:\workspace\migration-project\node_modules\tapable\lib\Tapable.js:233:16)
    at WebpackOptionsApply.process (D:\workspace\migration-project\node_modules\webpack\lib\WebpackOptionsApply.js:59:18)
    at webpack (D:\workspace\migration-project\node_modules\webpack\lib\webpack.js:28:48)
    at Class.exports.default.Task.extend.run (D:\workspace\migration-project\node_modules\angular-cli\tasks\build-webpack.js:20:31)
    at Class.Command.extend.run (D:\workspace\migration-project\node_modules\angular-cli\commands\build.js:50:26)
    at Class. (D:\workspace\migration-project\node_modules\angular-cli\lib\models\command.js:152:17)
    at tryCatch (D:\workspace\migration-project\node_modules\rsvp\dist\lib\rsvp\-internal.js:215:12)
    at invokeCallback (D:\workspace\migration-project\node_modules\rsvp\dist\lib\rsvp\-internal.js:230:13)
    at D:\workspace\migration-project\node_modules\rsvp\dist\lib\rsvp\then.js:29:16
    at flush (D:\workspace\migration-project\node_modules\rsvp\dist\lib\rsvp\asap.js:85:5)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)
 

And I actually don't have a directory or resource file in src. Not sure why he asks him.

OS: Windows 10
webpack: 2.1.0-beta.25
angular-cli: 1.0.0-beta.19-3 (locally and globally)
@angular and @ angular / stuff: latest version
No installation innpm install

Has anyone encountered a similar problem? Any links would be very helpful.

Update: The problem is related to angular-cli. The problem was resolved after rollback of angular-cli to 1.0.0-beta.17

+4
source share
1 answer

, src/assets angular -cli 1.0.0-beta.20-4

, angular -cli:

ng new migration-project

:

src/assets

.gitkeep

, , .

+3

Source: https://habr.com/ru/post/1660294/


All Articles