building widget web page results in errors and not finding translation files

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
Hi,

I am trying to extend the web page widget by adding auto scrolling functionality like the google spread sheet does. I found out what to do but now I need to integrate it in the widget web page. Unfortunately if I build it as per instructions I get errors in the npm-debug.log and later on during gulp build.

From npm-debug.log:
120370 error Windows_NT 6.1.7601120371 error argv "F:\\nodejs\\\\node.exe" "F:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
120372 error node v0.12.2
120373 error npm  v2.7.4
120374 error code ELIFECYCLE
120375 error phantomjs@1.9.16 install: `node install.js`
120375 error Exit status 1
120376 error Failed at the phantomjs@1.9.16 install script 'node install.js'.
120376 error This is most likely a problem with the phantomjs package,
120376 error not with npm itself.
120376 error Tell the author that this fails on your system:
120376 error     node install.js
120376 error You can get their info via:
120376 error     npm owner ls phantomjs
120376 error There is likely additional logging output above.

From gulp build
[21:32:57] Error: EPERM, rmdir 'F:\temp\widget-web-page\dist\components'    at Error (native)
[21:32:57] 'build' errored after 191 ms
[21:32:57] Error: [object Object]
    at formatError (C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:169:10)
    at Gulp.<anonymous> (C:\Users\Gebruiker\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:195:15)
    at Gulp.emit (events.js:129:20)
    at Gulp.Orchestrator._emitTaskDone (F:\temp\widget-web-page\node_modules\gulp\node_modules\orchestrator\index.js:264:8)
    at F:\temp\widget-web-page\node_modules\gulp\node_modules\orchestrator\index.js:275:23
    at finish (F:\temp\widget-web-page\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:21:8)
    at cb (F:\temp\widget-web-page\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:29:3)
    at finish (F:\temp\widget-web-page\node_modules\run-sequence\index.js:38:5)
    at Gulp.onError (F:\temp\widget-web-page\node_modules\run-sequence\index.js:45:4)
    at Gulp.emit (events.js:129:20)

Result is a working version of the widget (or at least the part that I checked) but the widget page is showing the non translated code (common.save instead of save and common.units.pixels instead of px). Are these issues related?

Any help would be appreciated.

Thanks in advance,

Pieter.
Photo of Pieter Schaafsma

Pieter Schaafsma

  • 102 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Stuart Lees

Stuart Lees, Employee

  • 586 Points 500 badge 2x thumb
Hi Pieter,

Can you try doing a fresh Git clone of the repo and then from the command line (while pointing to the directory of where you clones the project), run the commands in this specific order:

npm install

Any errors in the command line console?

bower install

Any errors in the command line console?

If after those two commands you didn't get any errors, run the following command:

gulp build

Any errors in the command line console?

Thanks
Photo of Stuart Lees

Stuart Lees, Employee

  • 586 Points 500 badge 2x thumb
Also, can you confirm that you have installed all the necessary dependencies for the repo? They are detailed in the Dependencies section of the repo README here
Photo of Pieter Schaafsma

Pieter Schaafsma

  • 102 Points 100 badge 2x thumb
Hi Stuart,

The output as written above was the result of my second try. For my second try I used new folder location.

I started out with installing GIT, node js, Bower and Gulp so all dependencies should be covered.
From the GIT powershell prompt I did all steps as described in the README.md
- Create clone into a folder.
- From that folder run the commands as described. 
- The npm install showed errors (as detailed above).
- The bower showed no errors
- The gulp showed errors as listed above

From the setting.js I can see that for translation a non-existent locales is targetted. It looks like the build uses the dev.js instead of the prod.js. The path components/rv-common-i18n/dist/locales/translation_ is used in the settings.js but this folder is not created in the dist folder.

So actually I do have 2 questions:
are the errors indicators of a faulty build or can I safely ignore them?
why is translation pointing to the wrong locales folder?

Thanks
Photo of Stuart Lees

Stuart Lees, Employee

  • 586 Points 500 badge 2x thumb
Hi Pieter,

Regarding your translation question, the build defaults on the "dev" environment and in which case, you will not see translations applied when previewing the Widget with the preview app. If you want to see proper translations, temporarily change the value of "dev" to "test" here .

About the errors, please provide your operating system details.

Thanks
Photo of Pieter Schaafsma

Pieter Schaafsma

  • 102 Points 100 badge 2x thumb
Hi Stuart,

I changed the settings to prod and reran the procedure starting with an npm install.
Output now is far better:

\> phantomjs@1.9.16 install F:\Temp\widget-web-page\node_modules\phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-windows.zip
Saving to C:\Users\Gebruiker\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip
Receiving...
  [================================--------] 79% 0.0s
Received 7292K total.
Extracting zip contents
Removing F:\Temp\widget-web-page\node_modules\phantomjs\lib\phantom
Copying extracted folder C:\Users\Gebruiker\AppData\Local\Temp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1430370678230\phantomjs-1.9.8-windows -> F:\Temp\widget-web-page\node_modules\phantomjs\lib\phantom
Writing location.js file
Done. Phantomjs binary available at F:\Temp\widget-web-page\node_modules\phantomjs\lib\phantom\phantomjs.exe
phantomjs@1.9.16 node_modules\phantomjs
+-- which@1.0.9
+-- progress@1.1.8
+-- kew@0.4.0
+-- request-progress@0.3.1 (throttleit@0.0.2)
+-- adm-zip@0.4.4
+-- npmconf@2.1.1 (uid-number@0.0.5, inherits@2.0.1, osenv@0.1.0, ini@1.3.3, onc
e@1.3.1, nopt@3.0.1, semver@4.3.3, mkdirp@0.5.0, config-chain@1.1.8)
+-- request@2.42.0 (caseless@0.6.0, json-stringify-safe@5.0.0, forever-agent@0.5
.2, aws-sign2@0.5.0, oauth-sign@0.4.0, stringstream@0.0.4, tunnel-agent@0.4.0, q
s@1.2.2, node-uuid@1.4.3, mime-types@1.0.2, form-data@0.1.4, tough-cookie@1.1.0,
 http-signature@0.10.1, bl@0.9.4, hawk@1.1.1)
+-- fs-extra@0.16.5 (graceful-fs@3.0.6, jsonfile@2.0.0, rimraf@2.3.2)

Don't know if it is related to the change in gulp.js or that phantomjs was not downloading correctly.
From the previous npm install log : 120367 verbose stack Error: phantomjs@1.9.16 install: `node install.js`. What I notice is that the downloaded version of phantom is different. (1.9.8-windows versus 1.9.16. probably Mac and Linux based.

To answer your question: I am running Windows 7SP1 64bit.

I just reran the procedure in a clean directory and now the output is clean/no errors.

Apparently the wrong version of phantom was retrieved earlier (for reasons unknown) but now the issue is gone and the errors are gone.

Thanks for your assistence.
Photo of Patrick Krul

Patrick Krul

  • 634 Points 500 badge 2x thumb
maybe a strange question. Are you running McAfee as a Antivirus? If so never run scripts from a folder named TEMP.
Photo of Stuart Lees

Stuart Lees, Employee

  • 586 Points 500 badge 2x thumb
Hi Pieter, 

Good to hear and no problem.

Thanks