Project

General

Profile

Actions

Bug #61664

open

make check bot: "npm ERR! code E404" on https://registry.npmjs.org/@applitools/logger/-/logger-1.0.4.tgz

Added by Radoslaw Zarzynski 11 months ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
build
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

[1995/2686] dashboard frontend dependencies are being installed FAILED: ../src/pybind/mgr/dashboard/frontend/node_modules /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend/node_modules cd /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/frontend && . /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/pybind/mgr/dashboard/frontend/node-env/bin/activate && CYPRESS_CACHE_FOLDER=/home/jenkins-build/build/workspace/ceph-pull-requests/build/src/pybind/mgr/dashboard/cypress NG_CLI_ANALYTICS=false npm ci -f --userconfig /home/jenkins-build/build/workspace/ceph-pull-requests/build/src/pybind/mgr/dashboard/frontend/node-env/.npmrc && deactivate npm WARN using --force I sure hope you know what you are doing. npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@applitools/logger/-/logger-1.0.4.tgz npm ERR! 404 npm ERR! 404 '@applitools/logger@1.0.4' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. See:
Actions #1

Updated by Sridhar Seshasayee 9 months ago

Observing a similar make check build failure consistently on latest main and on a node running CentOS 8.

[140/2204] dashboard frontend dependencies are being installed
FAILED: ../src/pybind/mgr/dashboard/frontend/node_modules 
cd /home/sseshasa/repos1/ceph/src/pybind/mgr/dashboard/frontend && . /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/frontend/node-env/bin/activate && CYPRESS_CACHE_FOLDER=/home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/cypress NG_CLI_ANALYTICS=false npm ci -f --userconfig /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/frontend/node-env/.npmrc && deactivate
npm WARN using --force Recommended protections disabled.
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated inside@1.0.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated gherkin@5.1.0: This package is now published under @cucumber/gherkin
npm WARN deprecated dommatrix@1.0.3: dommatrix is no longer maintained. Please use @thednp/dommatrix.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated cucumber-expressions@5.0.18: This package is now published under @cucumber/cucumber-expressions
npm WARN deprecated cucumber-expressions@6.6.2: This package is now published under @cucumber/cucumber-expressions
npm WARN deprecated core-js@3.6.4: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated @stylelint/postcss-markdown@0.36.2: Use the original unforked package instead: postcss-markdown
npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated @stylelint/postcss-css-in-js@0.37.3: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated cucumber-messages@8.0.0: This package is now published under @cucumber/messages
npm WARN deprecated gherkin@9.0.0: This package is now published under @cucumber/gherkin
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated cucumber@4.2.1: Cucumber is publishing new releases under @cucumber/cucumber
npm WARN deprecated core-js@3.20.3: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm notice 
npm notice New major version of npm available! 8.19.4 -> 9.8.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.8.1>
npm notice Run `npm install -g npm@9.8.1` to update!
npm notice 
npm ERR! code 1
npm ERR! path /home/sseshasa/repos1/ceph/src/pybind/mgr/dashboard/frontend/node_modules/cypress
npm ERR! command failed
npm ERR! command sh -c -- node index.js --exec install
npm ERR! Note: Overriding Cypress cache directory to: /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/cypress
npm ERR! 
npm ERR!       Previous installs of Cypress may not be found.
npm ERR! 
npm ERR! Cypress cannot write to the cache directory due to file permissions
npm ERR! 
npm ERR! See discussion and possible solutions at
npm ERR! https://github.com/cypress-io/cypress/issues/1281
npm ERR! 
npm ERR! ----------
npm ERR! 
npm ERR! Failed to access /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/cypress:
npm ERR! 
npm ERR! EACCES: permission denied, mkdir '/home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/cypress'
npm ERR! 
npm ERR! ----------
npm ERR! 
npm ERR! Platform: linux-x64 (CentOS - 8.5.2111
npm ERR! )
npm ERR! Cypress Version: 10.11.0

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/frontend/node-env/.npm/_logs/2023-08-01T10_34_27_767Z-debug-0.log

The installation of Cypress doesn't go through and the build terminates.

Are there any workarounds or a resolution for this?

Actions #2

Updated by Nizamudeen A 9 months ago

it looks like its lacking permission for npm to install stuffs there. so maybe you could try giving that folder permission.
EACCES: permission denied, mkdir '/home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/cypress'

sudo chown -R <user>:<user> /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/cypress

and the original error provided here, I haven't seen it since. So it could have been some issue with npm package at that time!

Actions #3

Updated by Nizamudeen A 9 months ago

to prevent other possible permission issue maybe you could chown the entire dashboard directory!

Actions #4

Updated by Sridhar Seshasayee 9 months ago

Nizamudeen A wrote:

to prevent other possible permission issue maybe you could chown the entire dashboard directory!

I tried changing permissions on the entire dashboard directory but still get the same error.

Actions #5

Updated by Nizamudeen A 9 months ago

Reading through this thread that cypress points out in the error message, https://github.com/cypress-io/cypress/issues/1281, looks like the main cause of the issue is that the dashboard/cypress folder doesn't have the write permissions set. Although I am not sure how that could be the case maybe the script needs to be run with sudo permission. You can try deleting the cypress folder manually and re-run the script again to see it succeeds.

Also could you pass me the commands you do so I can also try this in a centos8 container.

Actions #6

Updated by Sridhar Seshasayee 9 months ago

Nizamudeen A wrote:

Also could you pass me the commands you do so I can also try this in a centos8 container.

The steps are the same as described on the Ceph github repository:

The node has many users configured and I am using this since a while without any issue
thus far using the below steps. I have to run 'ninja' with sudo so that packages get
installed and so far there have been no problems.

Steps:

1. Clone the Ceph repo (main branch) to <my_path>
2. cd <my_path>/ceph
3. git submodule update --init --recursive
4. ./install_deps.sh
5. ./do_cmake.sh "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
6. cd build
7. sudo ninja -j 11

A few mins later errors are reported when dashboard dependencies are being installed with EACCES error.

Actions #7

Updated by Sridhar Seshasayee 9 months ago

I tried with a fresh repo and used the same steps I mentioned in my previous comment.
This time too I see the following EACCES error but due to a different reason:

[sseshasa@incerta06 build]$ sudo ninja -j 17
[15/1513] dashboard frontend is being created
FAILED: src/pybind/mgr/dashboard/frontend/dist 
cd /home/sseshasa/repos1/ceph/src/pybind/mgr/dashboard/frontend && . /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/frontend/node-env/bin/activate && DASHBOARD_FRONTEND_LANGS="" npm run build:localize -- --output-path /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/frontend/dist --configuration=production --progress=false && deactivate

> ceph-dashboard@0.0.0 build:localize
> node cd --env --pre && ng build --localize --output-path /home/sseshasa/repos1/ceph/build/src/pybind/mgr/dashboard/frontend/dist --configuration=production --progress=false

[cd.js] './angular.backup.json' already exists, restoring it into './angular.json'}
[cd.js] Preparing build of EN.
/home/sseshasa/repos1/ceph/src/pybind/mgr/dashboard/frontend/cd.js:125
    if (err) throw err;
             ^

[Error: EACCES: permission denied, copyfile 'src/environments/environment.tpl.ts' -> 'src/environments/environment.ts'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'copyfile',
  path: 'src/environments/environment.tpl.ts',
  dest: 'src/environments/environment.ts'
}
[31/1513] Building CXX object src/test/librbd/CMakeFiles/unittest_librbd.dir/crypto/test_mock_CryptoObjectDispatch.cc.o
ninja: build stopped: subcommand failed.
Actions #8

Updated by Mark Nelson 9 months ago

I can confirm, I'm hitting something very similar compiling a modified main branch from earlier today:

[nhm@mako01 build]$ scl enable gcc-toolset-11 'sudo ninja -j40 install'
[61/1474] dashboard frontend is being created
FAILED: src/pybind/mgr/dashboard/frontend/dist 
cd /home/nhm/src/markhpc/ceph/src/pybind/mgr/dashboard/frontend && . /home/nhm/src/markhpc/ceph/build/src/pybind/mgr/dashboard/frontend/node-env/bin/activate && DASHBOARD_FRONTEND_LANGS="" npm run build:localize -- --output-path /home/nhm/src/markhpc/ceph/build/src/pybind/mgr/dashboard/frontend/dist --configuration=production --progress=false && deactivate

> ceph-dashboard@0.0.0 build:localize
> node cd --env --pre && ng build --localize --output-path /home/nhm/src/markhpc/ceph/build/src/pybind/mgr/dashboard/frontend/dist --configuration=production --progress=false

[cd.js] './angular.backup.json' already exists, restoring it into './angular.json'}
[cd.js] Preparing build of EN.
[cd.js] 'src/environments/environment.tpl.ts' was copied to 'src/environments/environment.prod.ts'
[cd.js] 'src/environments/environment.tpl.ts' was copied to 'src/environments/environment.ts'
[cd.js] Writing to ./angular.json
[cd.js] Placeholders were replace in 'src/environments/environment.prod.ts'
[cd.js] Placeholders were replace in 'src/environments/environment.ts'

./src/styles.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].rules[0].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[5].rules[1].use[0]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[5].rules[1].use[1]!./src/styles.scss - Warning: Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning

(2491:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

Warning: /home/nhm/src/markhpc/ceph/src/pybind/mgr/dashboard/frontend/src/environments/environment.prod.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.

./src/main.ts - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: EACCES: permission denied, open '/home/nhm/src/markhpc/ceph/src/pybind/mgr/dashboard/frontend/.angular/cache/13.3.11/babel-webpack/53bad35dec3c439feaaed735d5ce302f.json'

Actions #9

Updated by Nizamudeen A 9 months ago

I was checking this issue over the weekend and saw that this actually happens because of the node v16 [1] which we recently upgraded to [2] and it hasn't been yet backported to reef or other branches. We updated to node 16 because of another issues in node 14. And it looks like we'll need to move forward with newer node versions.
To update to node v18, we need to update our angular to newer versions (currently its 13 which is not supported by node 18). We'll look at upgrading the node and angular in the coming weeks.

[1] https://stackoverflow.com/questions/70952903/npm-error-eacces-permission-denied-scandir
[2] https://github.com/ceph/ceph/pull/52546

Already started the PRs: https://github.com/ceph/ceph/pull/51979
https://github.com/ceph/ceph/pull/52828

Actions #10

Updated by Nizamudeen A 7 months ago

This should be fixed now. We've upgraded the dependencies in the main branch so I think that'll get rid of kind of issues

Actions

Also available in: Atom PDF