Help - Error to compile ONOS 2.4.0 (gui1_npm)

629 views
Skip to first unread message

Luciano Martins

unread,
Aug 7, 2020, 1:36:25 PM8/7/20
to onos...@onosproject.org, Nadia Adel Nassif, Jose Luis Schifferli Lopes, Niudomar Siqueira de Araújo Chaves
Hello all.... I´m pretty new in this group, Please help me if it is possible;

I tried to compile ONOS 2.4.0 using "bazel build onos", BUT some ERROR is happening.,

What is the cause of the ERROR? How can I fix it?

Tks
Regards,
Luciano


Starting local Bazel server and connecting to it...
INFO: Call stack for the definition of repository 'gui1_npm' which is a npm_install (rule definition at /root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:309:15):
 - <builtin>
 - /root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/build_bazel_rules_nodejs/index.bzl:80:5
 - /opt/onos/WORKSPACE:179:1
ERROR: An error occurred during the fetch of repository 'gui1_npm':
   npm_install failed:

> phantomjs...@2.1.16 install /opt/onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> node install.js

 (sh: 1: node: Permission denied
npm WARN onos-gu...@2.3.0 No description
npm WARN onos-gu...@2.3.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@2.1.2 (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! phantomjs...@2.1.16 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs...@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-07T17_24_46_175Z-debug.log
)
ERROR: /opt/onos/web/gui/BUILD:98:1: //web/gui:_onos-gui-npm-install depends on @gui1_npm//:node_modules in repository @gui1_npm which failed to fetch. no such package '@gui1_npm//': npm_install failed:
> phantomjs...@2.1.16 install /opt/onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> node install.js

 (sh: 1: node: Permission denied
npm WARN onos-gu...@2.3.0 No description
npm WARN onos-gu...@2.3.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@2.1.2 (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! phantomjs...@2.1.16 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs...@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-07T17_24_46_175Z-debug.log
)
ERROR: Analysis of target '//:onos' failed; build aborted: no such package '@gui1_npm//': npm_install failed:
> phantomjs...@2.1.16 install /opt/onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> node install.js

 (sh: 1: node: Permission denied
npm WARN onos-gu...@2.3.0 No description
npm WARN onos-gu...@2.3.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@2.1.2 (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! phantomjs...@2.1.16 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs...@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-07T17_24_46_175Z-debug.log
)
INFO: Elapsed time: 306.084s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1025 packages loaded, 28821 targets configured)
root@Ubuntu-Base-100G:/opt/onos# root@Ubuntu-Base-100G:/opt/onos# bazel build onos
bash: root@Ubuntu-Base-100G:/opt/onos#: No such file or directory
Starting local Bazel server and connecting to it...
INFO: Call stack for the definition of repository 'gui1_npm' which is a npm_install (rule definition at /root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:309:15):
 - <builtin>
 - /root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/build_bazel_rules_nodejs/index.bzl:80:5
 - /opt/onos/WORKSPACE:179:1
ERROR: An error occurred during the fetch of repository 'gui1_npm':
   npm_install failed:
> phantomjs...@2.1.16 install /opt/onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> node install.js

 (sh: 1: node: Permission denied
npm WARN onos-gu...@2.3.0 No description
npm WARN onos-gu...@2.3.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@2.1.2 (node_modules/karma/node_modules/fsevents):
root@Ubuntu-Base-100G:/opt/onos# Starting local Bazel server and connecting to it...
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! phantomjs...@2.1.16 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs...@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-07T17_24_46_175Z-debug.log
)
ERROR: /opt/onos/web/gui/BUILD:98:1: //web/gui:_onos-gui-npm-install depends on @gui1_npm//:node_modules in repository @gui1_npm which failed to fetch. no such package '@gui1_npm//': npm_install failed:
> phantomjs...@2.1.16 install /opt/onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> node install.js

 (sh: 1: node: Permission denied
npm WARN onos-gu...@2.3.0 No description
npm WARN onos-gu...@2.3.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@2.1.2 (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! phantomjs...@2.1.16 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs...@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-07T17_24_46_175Z-debug.log
)
ERROR: Analysis of target '//:onos' failed; build aborted: no such package '@gui1_npm//': npm_install failed:
> phantomjs...@2.1.16 install /opt/onos/tools/gui/node_modules/karma-phantomjs-launcher/node_modules/phantomjs-prebuilt
> node install.js

 (sh: 1: node: Permission denied
npm WARN onos-gu...@2.3.0 No description
npm WARN onos-gu...@2.3.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsev...@2.1.2 (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsev...@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"oStarting: command not found


--

Luciano Martins

CPQD - Diretoria de Operações

Tel.: +55 19 3705-4089 / Cel.: +55 19 99790-6052

lmar...@cpqd.com.br


"Esta mensagem pode conter informações confidenciais ou privilegiadas. Caso não seja o destinatário desta mensagem ou caso ela lhe tenha sido enviada por engano, pedimos a gentileza de eliminar esta mensagem e todos os seus anexos imediatamente. Utilizar, divulgar a quaisquer terceiros ou copiar esta mensagem para qualquer fim é expressamente proibido e punido por lei."

"This message may contain privileged or confidential information. If you are not the intended recipient of this message or if you have received it in error, please kindly delete this message and all its attachments immediately. Unauthorized use, disclosure to any third parties or copying of this message is expressly prohibited and may be subject to the penalties of law."

Sean Condon

unread,
Aug 7, 2020, 2:22:57 PM8/7/20
to Luciano Martins, ONOS Developers, Nadia Adel Nassif, Jose Luis Schifferli Lopes, Niudomar Siqueira de Araújo Chaves
If you already have npm installed on your system it will create a problem for building ONOS with Bazel. You can tell by running "which npm".  Bazel will install it's own version of "npm" and keep it in the bazel cache folder. 

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/CAH7XjRhJatownporYYtv7M2F%2Bd0EN54Wdy6ReK1CHzmyju5r5w%40mail.gmail.com.


--
Sean Condon
Member of Technical Staff
Open Networking Foundation

Luciano Martins

unread,
Aug 7, 2020, 2:33:16 PM8/7/20
to Sean Condon, ONOS Developers, Nadia Adel Nassif, Jose Luis Schifferli Lopes, Niudomar Siqueira de Araújo Chaves
Hi Sean.. Tks for you answer!..

It seems that there is no previous installed npm, see:

---------------------------------------
root@Ubuntu-Base-100G:/opt# which npm

root@Ubuntu-Base-100G:/opt# find / -name "npm"
/opt/onos/web/gui2/node_modules/@bazel/typescript/third_party/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/nodejs_linux_amd64/bin/nodejs/bin/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/nodejs_linux_amd64/bin/nodejs/lib/node_modules/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/nodejs_linux_amd64/bin/nodejs/lib/node_modules/npm/bin/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/nodejs_linux_amd64/bin/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/npm_bazel_typescript/third_party/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/build_bazel_rules_nodejs/third_party/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/npm
/root/.cache/bazel/_bazel_root/63f4da2dba00fbb4647f56de0c213dbb/external/npm/_workspaces/npm_bazel_typescript/third_party/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/nodejs_linux_amd64/bin/nodejs/bin/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/nodejs_linux_amd64/bin/nodejs/lib/node_modules/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/nodejs_linux_amd64/bin/nodejs/lib/node_modules/npm/bin/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/nodejs_linux_amd64/bin/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/npm_bazel_typescript/third_party/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/build_bazel_rules_nodejs/third_party/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/npm
/root/.cache/bazel/_bazel_root/dd0d7d6de3db96ee4fc706dc83456f9b/external/npm/_workspaces/npm_bazel_typescript/third_party/npm
/usr/local/share/.cache/yarn/v6/np...@bazel-typescript-1.6.0-8dfd29e71bcf917d5f9cb67f19ac4dcfc9082439-integrity/node_modules/@bazel/typescript/third_party/npm


root@Ubuntu-Base-100G:/opt# dpkg -l | grep npm


-------------------------------------

I really tried to find some tips on Google but it is not easy to find it.

Any other idea?

tks again
Luciano

Sean Condon

unread,
Aug 7, 2020, 2:48:34 PM8/7/20
to Luciano Martins, ONOS Developers, Nadia Adel Nassif, Jose Luis Schifferli Lopes, Niudomar Siqueira de Araújo Chaves
ok - thanks for checking. 

I see from your first output that you are building as root from inside /opt/onos

You should be building as a non-root user from the home directory of that user i.e.  ~/onos

also use "bazel clean --expunge" to clear the cache

Luciano Martins

unread,
Aug 7, 2020, 3:11:17 PM8/7/20
to Sean Condon, ONOS Developers, Nadia Adel Nassif, Jose Luis Schifferli Lopes, Niudomar Siqueira de Araújo Chaves
Hi Sean... It's running right now, and it seems it is working....

I´ll tell you after finish

tks!

Luciano Martins

unread,
Aug 7, 2020, 3:43:02 PM8/7/20
to Sean Condon, ONOS Developers, Nadia Adel Nassif, Jose Luis Schifferli Lopes, Niudomar Siqueira de Araújo Chaves
Hi Sean!!!

Compilation succeeded!!!!!
image.png

Now I'll try to run it!

Tks a lot

Victor ocheri

unread,
Oct 21, 2020, 8:01:08 AM10/21/20
to ONOS Developers, Luciano Martins, ONOS Developers, Nadia Adel Nassif, Jose Luis Schifferli Lopes, Niudomar Siqueira de Araújo Chaves, se...@opennetworking.org
Hi,

Please, I get the following error when i try to build ONOS 3.0.0 using bazel 3.6.0 on my Win 10 machine.

PS C:\Users\voche\onos> bazel build onos
INFO: Reading rc options for 'build' from c:\users\voche\onos\.bazelrc:
'build' options: --javabase=@org_onosproject_onos//tools/build/jdk:default_jdk --host_javabase=@org_onosproject_onos//
tools/build/jdk:default_jdk --java_toolchain=@org_onosproject_onos//tools/build/jdk:default_toolchain --host_java_toolch
ain=@org_onosproject_onos//tools/build/jdk:default_toolchain --host_force_python=PY2 --nouse_ijars --experimental_strict
_action_env --incompatible_new_actions_api=false --incompatible_generated_protos_in_virtual_imports=false --incompatible
_depset_union=false --define=angular_ivy_enabled=True
ERROR: --incompatible_depset_union=false :: Unrecognized option: --incompatible_depset_union=false

Could anyone help in finding what's wrong? I'm new to ONOS.

wan ken

unread,
Jan 29, 2021, 8:05:42 AM1/29/21
to ONOS Developers, Luciano Martins
Hi,
There are some issues the same as yours .Could I ask you some questions? my problem is it ha been stucked like:


created bazel-out/k8-fastbuild/bin/web/gui2/src/main/webapp/bundle-es2015 in 15.5s
INFO: From Minifying JavaScript web/gui2/src/main/webapp/bundle-es2015.min [terser]:
(node:25) ExperimentalWarning: The fs.promises API is experimental
INFO: From Action web/gui2/src/main/webapp/prodapp:
(node:121422) ExperimentalWarning: The fs.promises API is experimental
[2,470 / 2,475] Executing genrule //web/gui:_onos-gui-npm-install; 4042s linux-sandbox


Have you encountered the same one?

thanks a lot.
best regards,
wan
Reply all
Reply to author
Forward
0 new messages