i am new for nodejs, in my hybris project, first i installed nodejs, run 'npm install','npm i cross-env' commands, when i run the command 'npm run hybris' from node_module folder, i got some errors can you provide any solution.
C:\Atlas_Insta\hybris\bin\custom\rodanandfields\rodanandfieldsstorefront\FE-Develop>npm run hybris
> RodanAndFields#1.0.0 hybris C:\Atlas_Insta\hybris\bin\custom\rodanandfields\rodanandfieldsstorefront\FE-Develop
> cross-env NODE_ENV=production gulp hybris-build
[15:29:07] Using gulpfile C:\Atlas_Insta\hybris\bin\custom\rodanandfields\rodanandfieldsstorefront\FE-Develop\gulpfile.js
[15:29:07] Starting 'clean'...
[15:29:07] Finished 'clean' after 128 ms
[15:29:07] Starting 'markupCompile'...
[15:29:08] Starting 'sass'...
[15:29:09] Finished 'sass' after 615 ms
[15:29:09] Starting 'js'...
[15:29:09] Finished 'js' after 129 ms
[15:29:09] Starting 'copy-img'...
[15:29:09] Finished 'copy-img' after 584 μs
[15:29:09] Starting 'copy-fonts'...
[15:29:09] Finished 'copy-fonts' after 597 μs
[15:29:09] Starting 'copy-api'...
[15:29:09] Finished 'copy-api' after 630 μs
[15:29:09] Starting 'read-templates'...
[15:29:09] Finished 'read-templates' after 1.87 ms
All templates written successfully!
[15:29:32] Version: webpack 1.15.0
Asset Size Chunks Chunk Names
app.js 1.19 MB 0 [emitted] app
app.map 9.63 MB 0 [emitted] app
ERROR in C:/Atlas_Repo/bin/custom/rodanandfields/rodanandfieldsstorefront/FE-Develop/web/webroot/WEB-INF/r2/fe-components/checkout/order-summary/order-summary.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../../../../../_ui/frontend/js/analytics/analytics-eventmap-r2 in C:\Atlas_Repo\bin\custom\rodanandfields\rodanandfieldsstorefront\FE-Develop\web/webroot/WEB-INF/r2/fe-components\checkout\order-summary
# C:/Atlas_Repo/bin/custom/rodanandfields/rodanandfieldsstorefront/FE-Develop/web/webroot/WEB-INF/r2/fe-components/checkout/order-summary/order-summary.js 23:30-103
ERROR in C:/Atlas_Repo/bin/custom/rodanandfields/rodanandfieldsstorefront/FE-Develop/web/webroot/WEB-INF/r2/fe-components/checkout/checkout-form-billing/checkout-form-billing.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../../../../../_ui/frontend/js/analytics/analytics-config-r2 in C:\Atlas_Repo\bin\custom\rodanandfields\rodanandfieldsstorefront\FE-Develop\web/webroot/WEB-INF/r2/fe-components\checkout\checkout-form-billing
# C:/Atlas_Repo/bin/custom/rodanandfields/rodanandfieldsstorefront/FE-Develop/web/webroot/WEB-INF/r2/fe-components/checkout/checkout-form-billing/checkout-form-billing.js 23:22-93
Which Hybris version are you using? I had a smilar problem with hybris 6.6. It worked for me after I switch to node v6.14.3 I was using a more recent node with a more recent npm version.
I found this version inside the npmancillary extension's folder
ext-content/npmancillary/resources/npm/node
Related
Node version 10.13.0, gulp and angular "1.6.2"
The imported file is
const OverledgerSDK = require('#quantnetwork/overledger-bundle').default;
And the error is:
[13:39:26] gulp-notify: [Gulp notification] Copy Complete!
[13:39:26] Finished 'copy' after 15 s
[13:39:38] gulp-notify: [Gulp notification] HTML Complete!
[13:39:38] Finished 'html' after 38 s
[13:39:38] Starting 'build'...
[13:39:38] Finished 'build' after 19 μs
[13:39:38] Starting 'default'...
[13:39:38] Finished 'default' after 6.3 μs
events.js:167
throw er; // Unhandled 'error' event
^
Error: Parsing file /etherwallet/node_modules/fs-extra/lib/empty/index.js: Unexpected token (13:10)
In my react project everything works fine on my vmware. But when I cloned the same app and ran gulp command I am getting this error during compilation saying
MacBook-Pro:Frontend1.0 apurvgandhwani$ gulp
[18:42:31] Failed to load external module #babel/register
[18:42:31] Requiring external module babel-register
[18:42:32] Using gulpfile ~/Frontend1.0/gulpfile.babel.js
[18:42:32] Starting 'build:watch'...
[18:42:32] Starting 'copy:assets'...
[18:42:32] Starting 'copy:vendors'...
Cleaned build/
Copied 12 asset entries.
[18:42:32] Finished 'copy:vendors' after 329 ms
[18:42:32] Starting 'copy:views'...
[18:42:32] copied views all files 19.75 kB
[18:42:32] Finished 'copy:views' after 77 ms
[18:42:32] Starting 'copy:public'...
[18:42:33] Finished 'copy:public' after 132 ms
[18:42:33] Finished 'copy:assets' after 540 ms
[18:42:33] Starting 'bundle:dll'...
DLL Bundled.
Hash: 45f26d608c690be6e6c5
Version: webpack 1.15.0
Time: 2181ms
Asset Size Chunks Chunk Names
dll.vendor.js 3.11 MB 0 [emitted] vendor
[18:42:35] Finished 'bundle:dll' after 2.21 s
[18:42:35] Starting 'bundle'...
Hash: 7457a3cd38cf5c991640
Version: webpack 1.15.0
Time: 508ms
Asset Size Chunks Chunk Names
server-bundle.js 37.3 kB 0 [emitted] main
-- server:watch bundled.
Hash: e4a95c52aac91b47f75c
Version: webpack 1.15.0
Time: 46339ms
Asset Size Chunks Chunk Names
main-bundle.js 20.1 MB 0 [emitted] main
-- client bundled.
[18:43:21] Finished 'bundle' after 46 s
[18:43:21] Starting 'start:server'...
Starting Node Server...
[18:43:21] Finished 'start:server' after 68 ms
[18:43:21] Starting 'watch:sync'...
[18:43:21] [nodemon] 1.11.0
[18:43:21] [nodemon] to restart at any time, enter `rs`
[18:43:21] [nodemon] watching: build/server-bundle.js
[18:43:21] [nodemon] starting `node --debug build/server-bundle.js`
Server Restarted: Reloading BrowserSync.
(node:6700) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
[18:43:21] [nodemon] app crashed - waiting for file changes before starting...
[tessact: ] Proxying: http://localhost:4200
[tessact: ] Access URLs:
-------------------------------------
Local: http://localhost:3001
External: http://192.168.0.32:3001
-------------------------------------
UI: http://localhost:3002
UI External: http://192.168.0.32:3002
-------------------------------------
[tessact: ] Watching files...
[18:43:21] Finished 'watch:sync' after 262 ms
[18:43:21] Starting 'watch:assets'...
[18:43:22] Finished 'watch:assets' after 110 ms
[18:43:22] Finished 'build:watch' after 50 s
[18:43:22] Starting 'default'...
[18:43:22] Finished 'default' after 37 μs
webpack built e4a95c52aac91b47f75c in 26323ms
Hash: e4a95c52aac91b47f75c
Version: webpack 1.15.0
Time: 26323ms
Asset Size Chunks Chunk Names
main-bundle.js 20.1 MB 0 main
webpack: Compiled successfully.
[18:50:28] [nodemon] restarting due to changes...
[18:50:28] [nodemon] starting `node --debug build/server-bundle.js`
Server Restarted: Reloading BrowserSync.
[tessact: ] Reloading Browsers...
(node:6705) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
[18:50:28] [nodemon] app crashed - waiting for file changes before starting...
Abort trap: 6
This is my package.json snippet
"dependencies": {
"#trendmicro/react-toggle-switch": "^0.5.5",
"animate.css": "^3.5.1",
"axis": "^0.6.1",
"babel-core": "^6.10.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"babel-preset-react": "^6.11.1",
"babel-preset-react-hmre": "^1.1.1",
I have followed a lot of threads but nothing seems to solve my case. What should I do to solve this? I already have babel-core instead of babel in my package.json which most of the solutions suggest.
I have solved it by downgrading the gulp version from 3.9.1 to 3.9.0. Looks like 3.9.1 is buggy.
This is just a warning that Gulp failed to load #babel/register but on the next line it successfully loaded the fallback module: babel-register
https://github.com/gulpjs/gulp/issues/1631
You could install the babel-core/register module to remove the warning, but it's not necessary.
You can remove the error with npm i -D babel-register (i = shorthand for install, D = shorthand for --save-dev)
After I upgrade my Nodejs to v9.3.0 and NPM to 5.5.1, failed to access the gulp serve server. The browser show the unsafe TLS security error.
I have removed ~.gcb-serve-data/, and run the gulp trust-dev-cert without error, but I cannot find the cert in my trust certificates, I am working in Win10.
Following is the **gulp trust-dev-cert" output:
[18:30:14] Starting gulp
[18:30:14] Starting 'trust-dev-cert'...
[18:30:14] Starting subtask 'configure-sp-build-rig'...
[18:30:14] Finished subtask 'configure-sp-build-rig' after 7.48 ms
[18:30:14] Starting subtask 'trust-cert'...
[18:30:14] Finished subtask 'trust-cert' after 79 ms
[18:30:14] Finished 'trust-dev-cert' after 90 ms
[18:30:14] ==================[ Finished ]==================
gulp trust-dev-cert must be executed IN the project folder.
My application runs fine in development. When I run the production build, app.js is missing from the build/lib/www/app folder. Could anyone offer some insight on how to track down what is going wrong with my build?
Thanks.
Update:
I walked through all the gulpfile trying to understand what was going on and finally got to the build function called at the end of the assets:prod task. Within that function I replaced the templates variable in the line
.pipe(gulpIf('**/app.js', footer(templates)))
with a test string and it works. So now I'm down to working out which template of many is causing the problem. What a pain. Is there a way to get gulp to give you a little more info such as some of the chars near where the error occurred?
./gradlew -Pprod clean bootRepackage
Starting a Gradle Daemon (subsequent builds will be faster)
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at gatling_b4a4yvzsw9z41nm1decp5w4n3.run(/Users/jreymann/projects-java/us.netblue/gradle/gatling.gradle:23)
:clean
:cleanResources UP-TO-DATE
:bootBuildInfo
:bower
:nodeSetup SKIPPED
:npmSetup SKIPPED
:npmInstall UP-TO-DATE
:gulpBuildWithOpts
[12:29:58] Using gulpfile ~/projects-java/us.netblue/gulpfile.js
[12:29:58] Starting 'clean'...
[12:29:58] Finished 'clean' after 4.63 ms
[12:29:58] Starting 'build'...
[12:29:58] Starting 'copy:fonts'...
[12:29:58] Starting 'copy:common'...
[12:29:58] Starting 'inject:vendor'...
[12:29:58] Starting 'ngconstant:prod'...
[12:29:58] Finished 'ngconstant:prod' after 23 ms
[12:29:58] gulp-inject 1 files into vendor.scss.
[12:29:58] Finished 'copy:common' after 78 ms
[12:29:58] gulp-inject 19 files into index.html.
[12:29:58] Finished 'inject:vendor' after 79 ms
[12:29:58] Finished 'copy:fonts' after 98 ms
[12:29:58] Starting 'copy'...
[12:29:58] Finished 'copy' after 19 μs
[12:29:58] Starting 'inject:app'...
[12:29:58] gulp-inject 143 files into index.html.
[12:29:58] Finished 'inject:app' after 168 ms
[12:29:58] Starting 'inject:troubleshoot'...
[12:29:58] gulp-inject Nothing to inject into index.html.
[12:29:58] Finished 'inject:troubleshoot' after 2.07 ms
[12:29:58] Starting 'images'...
[12:29:58] Starting 'sass'...
[12:29:58] Starting 'html'...
[12:29:58] Starting 'copy:swagger'...
[12:29:58] Starting 'copy:images'...
[12:29:58] Finished 'copy:images' after 8.98 ms
[12:29:59] Tested 18 tests, 18 passes, 0 failures: PASS
[12:29:59] gulp-imagemin: Minified 6 images (saved 6.79 kB - 17%)
[12:29:59] Finished 'images' after 459 ms
[12:29:59] Finished 'sass' after 492 ms
[12:29:59] Starting 'styles'...
[12:29:59] Finished 'styles' after 2.21 ms
[12:29:59] Finished 'html' after 527 ms
[12:29:59] Finished 'copy:swagger' after 527 ms
[12:29:59] Starting 'assets:prod'...
[12:30:12] Finished 'assets:prod' after 13 s
[12:30:12] Finished 'build' after 14 s
:processResources
:compileJava
[Fatal Error] shrinkwrap-descriptors-bom-2.0.0-alpha-3.pom:130:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
[Fatal Error] shrinkwrap-descriptors-bom-2.0.0-alpha-3.pom:130:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
[Fatal Error] commons-parent-39.pom:1506:5: The markup in the document following the root element must be well-formed.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
[Fatal Error] commons-parent-39.pom:1506:5: The markup in the document following the root element must be well-formed.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
:compileScala UP-TO-DATE
:classes
:findMainClass
:war
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
[Fatal Error] commons-lang3-3.4.pom:772:1: Content is not allowed in trailing section.
:bootRepackage
BUILD SUCCESSFUL
If I run the gulp build individually I get:
gulp build
[12:05:12] Using gulpfile ~/projects-java/us.netblue/gulpfile.js
[12:05:12] Starting 'clean'...
[12:05:12] Finished 'clean' after 21 ms
[12:05:12] Starting 'build'...
[12:05:12] Starting 'copy:fonts'...
[12:05:12] Starting 'copy:common'...
[12:05:12] Starting 'inject:vendor'...
[12:05:12] Starting 'ngconstant:prod'...
[12:05:12] Finished 'ngconstant:prod' after 25 ms
[12:05:12] gulp-inject 1 files into vendor.scss.
[12:05:12] Finished 'copy:common' after 80 ms
[12:05:12] gulp-inject 19 files into index.html.
[12:05:12] Finished 'inject:vendor' after 80 ms
[12:05:12] Finished 'copy:fonts' after 104 ms
[12:05:12] Starting 'copy'...
[12:05:12] Finished 'copy' after 24 μs
[12:05:12] Starting 'inject:app'...
[12:05:13] gulp-inject 143 files into index.html.
[12:05:13] Finished 'inject:app' after 179 ms
[12:05:13] Starting 'inject:troubleshoot'...
[12:05:13] gulp-inject Nothing to inject into index.html.
[12:05:13] Finished 'inject:troubleshoot' after 2.19 ms
[12:05:13] Starting 'images'...
[12:05:13] Starting 'sass'...
[12:05:13] Starting 'html'...
[12:05:13] Starting 'copy:swagger'...
[12:05:13] Starting 'copy:images'...
[12:05:13] Finished 'copy:images' after 7.44 ms
[12:05:13] Tested 18 tests, 18 passes, 0 failures: PASS
[12:05:13] gulp-imagemin: Minified 6 images (saved 6.79 kB - 17%)
[12:05:13] Finished 'images' after 439 ms
[12:05:13] Finished 'sass' after 483 ms
[12:05:13] Starting 'styles'...
[12:05:13] Finished 'styles' after 1.42 ms
[12:05:13] Finished 'html' after 511 ms
[12:05:13] Finished 'copy:swagger' after 514 ms
[12:05:13] Starting 'assets:prod'...
[12:05:26] gulp-notify: [JHipster Gulp Build] Error: Unexpected token .
[12:05:26] Finished 'assets:prod' after 13 s
[12:05:26] Finished 'build' after 14 s
After some hours of trying each template one at a time, I finally found the problem as being a typo in a template where there was a $ instead of $. That threw an the vague error in the JS related subtask in the build function.
If you open gulpfile.js there is a gulp task called 'html'.
If you run this task from the terminal by typing "gulp html" it will generate a file called 'templates.js' in 'target/tmp' folder.
This file has multiple $templateCache.put lines.
One of those lines maybe causing the error.
Run your application in PROD profile and keep the server running.
Delete almost all of the $templateCache.put lines except for homepage line in templates.js and run 'gulp build'.
Now hard refersh the browser and check if you are able to see the homepage.
If the homepage and the other lines are not causing the error you will see the homepage.
Now add back some of those deleted $templateCache.put lines to templates.js and run 'gulp build' again.
Repeat this process till you fine the line that is causing the issue.
Once you find out that line check the html page it mentions and try and remove all comments in that html file.
Some code in that html file maybe causing the issue.
Hope this helps.
I am trying to build a Sails.js and AngularJS app following this tutorial:
http://thoughtsmarkeddown.com/thoughts/javascript/setting-up-a-sails-js-with-angular-js-app-part-1/
I have setup my Sails App and angular App. Ater setting up the gulp file, which can be found here:
http://thoughtsmarkeddown.com/assets/Uploads/gulpfile.js
I ran the command gulp from my root folder and got the following error:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
[gulp] Error in plugin 'gulp-notify': No reporter specified.
I have no idea how to debug this. This is my first AngularJS app. Was just trying to use it with Sails for eaiser and faster development. If I am doing it the wrong way, can you suggest me some place else I should read about how to make a AngularJS + Sails.js app.
Following is the full stack trace:
[11:22:30] Using gulpfile ~/Prophesee Media/PropheseeDashboard/gulpfile.js
[11:22:30] Starting 'sass'...
[11:22:30] Finished 'sass' after 7.93 ms
[11:22:30] Starting 'sailsbasejs'...
[11:22:30] Finished 'sailsbasejs' after 3.04 ms
[11:22:30] Starting 'angularappjs'...
[11:22:30] Finished 'angularappjs' after 1.26 ms
[11:22:30] Starting 'bowerjs'...
[11:22:30] Finished 'bowerjs' after 5.78 ms
[11:22:30] Starting 'angularviews'...
[11:22:30] Finished 'angularviews' after 446 μs
[11:22:30] Starting 'watch'...
[11:22:30] Finished 'watch' after 216 ms
[11:22:30] Starting 'default'...
[11:22:30] Finished 'default' after 5.71 μs
stream.js:94
throw er; // Unhandled stream error in pipe.
^
[gulp] Error in plugin 'gulp-notify': No reporter specified.
at report (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp- notify/index.js:70:34)
at Transform.notify [as _transform] (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/index.js:19:5)
at Transform._read (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:238:10)
at writeOrBuffer (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:228:5)
at Transform.Writable.write (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp-notify/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:195:11)
at Stream.ondata (stream.js:51:26)
at Stream.EventEmitter.emit (events.js:95:17)
at queueData (/home/sambhav/Prophesee Media/PropheseeDashboard/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:43:21)
What version of gulp-notify you are using? We had a similar issue on a CI-system on a linux machine (see this issue). To solve this we've updated gulp-notify to the actual version 1.3.1.
To update your dev-dependencies you must remove the actual version first and install it again. It's a known bug from npm that you cannot use npm update on dev-dependencies. So what do I do?
# remove
npm rm --save-dev gulp-notify
# install again
npm install --save-dev gulp-notify
May it's helpful for you.
Ciao
Ralf
It's a known issue:
https://github.com/webcomm/magento-boilerplate/issues/32
solution:
update gulp to 3.5.6
"devDependencies": {
"gulp": "~3.5.6",
}
Try below command :
npm install --save gulp-notify //use save this will save the dependencies in package.json
Hope this will work!!