• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Issue How run this code in plesk node_modules/requirejs/bin/r.js

Antrax1

Basic Pleskian
Hi,
I have a magento 2.3 installation and I need run this code

node_modules/requirejs/bin/r.js -o pub/static/advancedbundling_build.js baseUrl=pub/static/frontend/Pearl/weltpixel_custom/es_ES_tmp dir=pub/static/frontend/Pearl/weltpixel_custom/es_ES

I try to install node JS but I´m confused with the next steps.

Thanks for help me!
 
I try with this without solution:

A: Check version in server OK
Code:
root@host:/home/ubuntu# plesk ext nodejs --versions
  Enabled  Version                         Path
    false   12.4.0  /opt/plesk/node/12/bin/node  (work with ubuntu?)
     true  10.16.0  /opt/plesk/node/10/bin/node
    false   8.16.0   /opt/plesk/node/8/bin/node

B: Check version in domain OK
Code:
root@host:/home/ubuntu# plesk ext nodejs --get-version -domain lolatoys.com
10.16.0

C: Check requirejs OK
Code:
/opt/plesk/node/10/bin/node node_modules/requirejs/bin/r.js
See https://github.com/requirejs/r.js for usage.

D: Run Script in root folder magento
node_modules/requirejs/bin/r.js -o pub/static/advancedbundling_build.js baseUrl=pub/static/frontend/Pearl/weltpixel_custom/es_ES_tmp dir=pub/static/frontend/Pearl/weltpixel_custom/es_ES

npm ERR! missing script: node_modules/requirejs/bin/r.js
npm ERR! A complete log of this run can be found in:
npm ERR! /var/www/vhosts/AAAAAAAA.com/.npm/_logs/2021-01-15T00_16_21_964Z-debug.log

2021-01-15T00_16_21_964Z-debug.log:

Code:
0 info it worked if it ends with ok
1 verbose cli [ '/opt/plesk/node/10/bin/node',
1 verbose cli   '/opt/plesk/node/10/bin/npm',
1 verbose cli   'run',
1 verbose cli   'node_modules/requirejs/bin/r.js',
1 verbose cli   '-o',
1 verbose cli   'pub/static/advancedbundling_build.js',
1 verbose cli   'baseUrl=pub/static/frontend/Pearl/weltpixel_custom/es_ES_tmp',
1 verbose cli   'dir=pub/static/frontend/Pearl/weltpixel_custom/es_ES' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: node_modules/requirejs/bin/r.js
4 verbose stack     at run (/opt/plesk/node/10/lib/node_modules/npm/lib/run-script.js:155:19)
4 verbose stack     at /opt/plesk/node/10/lib/node_modules/npm/lib/run-script.js:63:5
4 verbose stack     at /opt/plesk/node/10/lib/node_modules/npm/node_modules/read-package-json/read-json.js:115:5
4 verbose stack     at /opt/plesk/node/10/lib/node_modules/npm/node_modules/read-package-json/read-json.js:418:5
4 verbose stack     at checkBinReferences_ (/opt/plesk/node/10/lib/node_modules/npm/node_modules/read-package-json/read-json.js:373:45)
4 verbose stack     at final (/opt/plesk/node/10/lib/node_modules/npm/node_modules/read-package-json/read-json.js:416:3)
4 verbose stack     at then (/opt/plesk/node/10/lib/node_modules/npm/node_modules/read-package-json/read-json.js:160:5)
4 verbose stack     at ReadFileContext.<anonymous> (/opt/plesk/node/10/lib/node_modules/npm/node_modules/read-package-json/read-json.js:332:20)
4 verbose stack     at ReadFileContext.callback (/opt/plesk/node/10/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:16)
4 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:237:13)
5 verbose cwd /var/www/vhosts/lolatoys.com/httpdocs
6 verbose Linux 5.4.0-1035-aws
7 verbose argv "/opt/plesk/node/10/bin/node" "/opt/plesk/node/10/bin/npm" "run" "node_modules/requirejs/bin/r.js" "-o" "pub/static/advancedbundling_build.js" "baseUrl=pub/static/frontend/Pearl/weltpixel_custom/es_ES_tmp" "dir=pub/static/frontend/Pearl/weltpixel_custom/es_ES"
8 verbose node v10.16.0
9 verbose npm  v6.9.0
10 error missing script: node_modules/requirejs/bin/r.js
11 verbose exit [ 1, true ]

How can solve this?
 
Last edited:
Back
Top