Closed goodkarmahelps closed 6 years ago
I dont think this problem is related to angular itself. It probably makes more sense to ask this question on stackoverflow as it's a problem of combining gulp tasks with angular. The angular team has made the angular cli to prevent the need for such custom build tasks. Because you are using this custom build process, you are more or less on your own to fix it.
Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular
.
If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.
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.
During upgrade from Angular 4 to 7, gulp build fails as project is looking for node modules html files which are not found as they are not copied during copy:source task
I'm submitting a...
[X ] Bug report
[x ] Other... Its referring to node module folder when it should be ignored during gulp task of inline resources(creating dynamic UI html pages for each Angular component)
I get this error below --
After PS C:\dev\lib\src> gulp build [14:44:31] Working directory changed to C:\dev\lib [14:44:32] Using gulpfile C:\dev\lib\gulpfile.js [14:44:32] Starting 'build'... [14:44:32] Starting 'clean'... [14:44:32] Starting 'clean:dist'... [14:44:32] Finished 'clean:dist' after 4.2 ms [14:44:32] Starting 'clean:tmp'... [14:44:42] Finished 'clean:tmp' after 9.66 s [14:44:42] Starting 'clean:build'... [14:44:42] Finished 'clean:build' after 1.86 ms [14:44:42] Finished 'clean' after 9.67 s [14:44:42] Starting 'compile'... [14:44:42] Starting 'clean:dist'... [14:44:42] Finished 'clean:dist' after 581 μs [14:44:42] Starting 'copy:source'... [14:45:56] Finished 'copy:source' after 1.22 min [14:45:56] Starting 'inline-resources'... An error occured: { Error: ENOENT: no such file or directory, open 'C:\dev\lib.tmp\node_modules\@angular\animations\src\my-component-tpl.html' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at C:\dev\lib\tools\gulp\inline-resources.js:83:32 at String.replace ()
at inlineTemplate (C:\dev\lib\tools\gulp\inline-resources.js:81:18)
at reduce (C:\dev\lib\tools\gulp\inline-resources.js:70:29)
at Array.reduce ()
at inlineResourcesFromString (C:\dev\lib\tools\gulp\inline-resources.js:70:5)
at readFile.then.content (C:\dev\lib\tools\gulp\inline-resources.js:47:24)
at
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\dev\lib\.tmp\node_modules\@angular\animations\src\my-component-tpl.html' }An error occured: { Error: ENOENT: no such file or directory, open 'C:\dev\lib.tmp\node_modules\@angular\core\src\metadata\animation-cmp.html'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at C:\dev\lib\tools\gulp\inline-resources.js:83:32
at String.replace ()
at inlineTemplate (C:\dev\lib\tools\gulp\inline-resources.js:81:18)
at reduce (C:\dev\lib\tools\gulp\inline-resources.js:70:29)
at Array.reduce ()
at inlineResourcesFromString (C:\dev\lib\tools\gulp\inline-resources.js:70:5)
at readFile.then.content (C:\dev\lib\tools\gulp\inline-resources.js:47:24)
at
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\dev\lib\.tmp\node_modules\@angular\core\src\metadata\animation-cmp.html'
}
An error occured: { Error: ENOENT: no such file or directory, open 'C:\dev\lib.tmp\node_modules\@angular\core\src\metadata\my-comp.html'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at C:\dev\lib\tools\gulp\inline-resources.js:83:32
at String.replace ()
at inlineTemplate (C:\dev\lib\tools\gulp\inline-resources.js:81:18)
at reduce (C:\dev\lib\tools\gulp\inline-resources.js:70:29)
at Array.reduce ()
at inlineResourcesFromString (C:\dev\lib\tools\gulp\inline-resources.js:70:5)
at readFile.then.content (C:\dev\lib\tools\gulp\inline-resources.js:47:24)
at
Current behavior
After upgrading Angular 4 core packages to angular 7, I am unable to build my project as its looking for node_modules specific files which it shouldn't during the build process of inline-resources.
Tried steps
Expected behavior
Ignore node modules folder
What is the motivation / use case for changing the behavior?
Environment
Angular version: 7
Browser:
For Tooling issues:
Others:
2 files of package.json and its dependencies
OUTER FILE "dependencies": { "@angular/animations": "^7.0.1", "@angular/common": "^7.0.1", "@angular/core": "^7.0.1", "@angular/forms": "^7.0.1", "@angular/http": "^7.0.1", "@angular/language-service": "^7.0.1", "@angular/platform-browser": "^7.0.1", "@angular/platform-browser-dynamic": "^7.0.1", "@angular/router": "^7.0.1", "@ngx-translate/core": "^7.2.2", "@ngx-translate/http-loader": "^2.0.1", "@timkendrick/monaco-editor": "0.0.7", "@types/lodash": "^4.14.117", "bootstrap": "^3.3.7", "font-awesome": "~4.7.0", "jquery": "^3.3.1", "jsonpath": "^0.2.11", "latest": "^0.2.0", "lodash": "^4.17.11", "moment-timezone": "^0.5.21", "ng2-ace-editor": "0.3.1", "ng2-pdf-viewer": "^2.0.3", "primeng": "^4.3.0", "rxjs": "^6.3.3", "stacktrace-js": "^2.0.0", "util": "0.10.3", "zone.js": "^0.8.26" }, "devDependencies": { "@angular-devkit/build-angular": "~0.10.0", "@angular/cli": "^7.0.3", "@angular/compiler": "^7.0.1", "@angular/compiler-cli": "^7.0.1", "@types/jasmine": "^2.8.9", "@types/karma": "^1.7.7", "@types/moment-timezone": "^0.5.9", "@types/node": "^10.12.0", "@types/webpack": "^2.2.15", "@types/webpack-env": "^1.13.6", "codelyzer": "^4.5.0", "core-js": "^2.5.7", "del": "^2.2.2", "gulp": "^3.9.1", "gulp-bump": "^2.9.0", "gulp-header": "^1.8.12", "gulp-rename": "^1.4.0", "gulp-rollup": "^2.16.2", "i18next-conv": "^6.1.1", "jasmine-core": "^2.99.1", "jasmine-spec-reporter": "^3.2.0", "karma": "^1.4.1", "karma-chrome-launcher": "^2.0.0", "karma-cli": "^1.0.1", "karma-coverage-istanbul-reporter": "^0.2.0", "karma-jasmine": "^1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "node-sass": "^4.9.4", "node-sass-tilde-importer": "^1.0.2", "node-watch": "^0.5.8", "protractor": "^5.4.1", "rollup": "^0.66.6", "run-sequence": "^2.2.1", "ts-node": "^2.0.0", "tslint": "^4.5.0", "typescript": "^3.1.3" }, "engines": { "node": ">=8.0.0" }
INNER FILE "peerDependencies": { "@angular/animations": "^7.0.1", "@angular/common": "^7.0.1", "@angular/core": "^7.0.1", "@angular/forms": "^7.0.1", "@angular/http": "^7.0.1", "@angular/language-service": "^7.0.1", "@angular/platform-browser": "^7.0.1", "@angular/router": "^7.0.1", "rxjs": "^6.3.3" }, "dependencies": { "@angular/animations": "^7.0.1", "@angular/common": "^7.0.1", "@angular/core": "^7.0.1", "@angular/forms": "^7.0.1", "@angular/http": "^7.0.1", "@angular/language-service": "^7.0.1", "@angular/platform-browser": "^7.0.1", "@angular/router": "^7.0.1", "@ngx-translate/core": "^7.2.2", "@ngx-translate/http-loader": "^2.0.1", "@timkendrick/monaco-editor": "0.0.7", "@types/lodash": "^4.14.117", "bootstrap": "^3.3.7", "font-awesome": "~4.7.0", "jquery": "^3.2.1", "jsonpath": "^0.2.11", "latest": "^0.2.0", "lodash": "^4.17.11", "moment-timezone": "^0.5.21", "ng2-ace-editor": "0.3.1", "ng2-pdf-viewer": "^2.0.3", "primeng": "^4.3.0", "stacktrace-js": "^2.0.0", "util": "0.10.3", "zone.js": "^0.8.4" }
}