Upgrading #ui5/cli version in package.json throws error in Jenkins - ui5-tooling

I am trying to upgrade #ui5/cli version from 2.4.4 to 2.14.9 in package.json.
"devDependencies": {
"#ui5/cli": "^2.14.9",
"karma-ui5": "^2.4.0",
......
}
Everything looks good in local build.
But after pushing changes, it fails in Jenkins with the error -
ERROR - enoent ENOENT: no such file or directory, chmod '/xmake/j/prod-build10010/w/..../.../.../module/node_modules/#ui5/cli/bin/ui5.js'
Any suggestions, how to fix it?

Related

npm install working in Travis CI but failng in GitHub Actions

We are migrating from Travis CI to GitHub Actions. In Travis CI, we have builds for node repositories.
Travis CI Configuration:
dist: trusty
language: node_js
node_js:
- 6.10.3
With this configuration, In Travis CI, npm install is working.
GitHub Actions Configuration:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Setup Node.js environment
uses: actions/setup-node#v2.1.5
with:
node-version: '6.10.3'
- name: Check out repository code
uses: actions/checkout#v2.3.4
- name: script
run: |
npm install
But in GitHub Actions, I am getting below error
29484 verbose correctMkdir /github/home/.npm correctMkdir not in flight; initializing
129485 verbose afterAdd /github/home/.npm/bower/1.8.2/package/package.json written
129486 silly rollbackFailedOptional Starting
129487 silly rollbackFailedOptional Finishing
129488 silly runTopLevelLifecycles Finishing
129489 silly install printInstalled
129490 verbose stack Error: ENOENT: no such file or directory, open '/tmp/npm-604-fb46bda8/registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz'
129490 verbose stack at Error (native)
129491 verbose cwd /__w/website/website
129492 error Linux 5.4.0-1047-azure
129493 error argv "/__t/node/6.10.3/x64/bin/node" "/__t/node/6.10.3/x64/bin/npm" "i"
129494 error node v6.10.3
129495 error npm v3.10.10
129496 error path /tmp/npm-604-fb46bda8/registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz
129497 error code ENOENT
129498 error errno -2
129499 error syscall open
129500 error enoent ENOENT: no such file or directory, open '/tmp/npm-604-fb46bda8/registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz'
129501 error enoent ENOENT: no such file or directory, open '/tmp/npm-604-fb46bda8/registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz'
129501 error enoent This is most likely not a problem with npm itself
129501 error enoent and is related to npm not being able to find a file.
129502 verbose exit [ -2, true ]
I have tried below steps, but with no luck.
npm cache clean -f
rm node_modules package-lock.json
So far I am thinking of OS difference between two CIs. Travis being Ubuntu 14.04 and GitHub Actions being Ubuntu 20.04 (I also tried with 18.04)
Anyone has faced similar issues? Any ideas for work-around?
If any more information is required, do let me know!
Thanks!

Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH. Could you tell me what the problem is?

I'm using npm install -g yo gulp to install yeoman and this is the error I'm getting
npm WARN deprecated cross-spawn-async#2.2.5: cross-spawn no longer requires a build toolchain, use it instead
C:\Usr\local\gulp -> C:\Usr\local\node_modules\gulp\bin\gulp.js
C:\Usr\local\yo -> C:\Usr\local\node_modules\yo\lib\cli.js
C:\Usr\local\yo-complete -> C:\Usr\local\node_modules\yo\lib\completion\index.js
> yo#3.1.0 postinstall C:\Usr\local\node_modules\yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
√ No .bowerrc file in home directory
√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ No .yo-rc.json file in home directory
√ Node.js version
{ Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
at notFoundError (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:8:11)
at verifyENOENT (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:43:16)
at ChildProcess.cp.emit (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:30:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
cmd: 'C:\\WINDOWS\\system32\\cmd.exe /s /c "yo "--version""' }
× yo version
{ Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
at notFoundError (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:8:11)
at verifyENOENT (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:43:16)
at ChildProcess.cp.emit (C:\Usr\local\node_modules\yo\node_modules\cross-spawn-async\lib\enoent.js:30:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
cmd: 'C:\\WINDOWS\\system32\\cmd.exe /s /c "yo "--version""' }
√ npm version
Found potential issues on your machine :(
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.9 (node_modules\gulp\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ gulp#4.0.2
+ yo#3.1.0
updated 2 packages in 23.31s
Run the following command to see where npm puts global packages
npm config get prefix
You'll get output similar to this
/usr/local/Cellar/node/10.5.0_1
Copy the output or path and then using any code editor open your .bashrc or .zshrc file depending on the terminal you use and paste like so
export PATH="$PATH:"/usr/local/Cellar/node/10.5.0_1/bin/""
Then after saving run
source ~/.zshrc
Like Xander Cage said.
I have uninstalled node.js -> procedure here
I have restarted my PC.
Then I installed again node.js
It work.
The above didn't work for me at all.
The following solved my problem:
clean installed nodejs and followed steps by dv-here in thread: https://github.com/zkat/npx/issues/100
Note that my npm kept pointing to C:\usr...
I think I set the npm config set prefix= to something mistakenly due to which I was >getting the error. Here's how I fixed it:
Open CMD in "Administrator" mode.
npm cache clear --force
npm install
npm config set cache C:\Users\myname\AppData\Roaming\npm-cache
npm config set prefix C:\Users\myname\AppData\Roaming\npm
I just ran into this issue on MacOS, and saw that all of my global npm binaries were symlinked into the /usr/local/bin directory, except for yo. I created a symlink using this command:
ln -s /usr/local/Cellar/node/12.10.0/bin/yo /usr/local/bin/yo
(Yours may vary)
And yo is now callable.
I had same issue and I really didn't want uninstall nodejs as I have a lot of package installed.
Tried also with the second answer and did not worked.
Then I found this ticked, that is been closed:
https://github.com/yeoman/yeoman/issues/1716
install with yarn command for me worked.
yarn global add yo
Seem then the installation went through with also binary installed.
Nevermind try to install it with npm getting same error, so looking for provide more infos

Can't use react-native-svg. Xcode can't open PerformanceBezier and QuartzBookPack

I'm new to React Native and Xcode.
When I npm install react-native-svg I get the following:
Start downloading PerformanceBezier to /Users/username/AwesomeProject/node_modules/react-native-svg/ios/PerformanceBezier
Download PerformanceBezier library from github failed with err: { Error: ENOTEMPTY: directory not empty, rename '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988242148-4207165471078973/PerformanceBezier-master' -> '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/PerformanceBezier'
errno: -66,
code: 'ENOTEMPTY',
syscall: 'rename',
path: '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988242148-4207165471078973/PerformanceBezier-master',
dest: '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/PerformanceBezier' }
Download PerformanceBezier library success!
Start downloading QuartzBookPack to /Users/username/AwesomeProject/node_modules/react-native-svg/ios/QuartzBookPack
Download QuartzBookPack library from github failed with err: { Error: ENOTEMPTY: directory not empty, rename '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988243034-9050633810649857/QuartzBookPack-master' -> '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/QuartzBookPack'
errno: -66,
code: 'ENOTEMPTY',
syscall: 'rename',
path: '/Users/username/AwesomeProject/node_modules/react-native-svg/1511988243034-9050633810649857/QuartzBookPack-master',
dest: '/Users/username/AwesomeProject/node_modules/react-native-svg/ios/QuartzBookPack' }
Download QuartzBookPack library success!
+ react-native-svg#6.0.1-rc.0
Clearly it's having a problem, but then it says that they're both successfully installed. When I try to build the Xcode project I get an error saying that Xcode can't open either of their .xcodeproject files.
Is this something that's going wrong on my end, or is there an issue with the repos that these files are being pulled from?
I have react-native-cli: 2.0.1 and react-native: 0.50.4. and am trying to install react-native-svg#6.0.1-rc.0.
Looks like this has been reported here: https://github.com/react-native-community/react-native-svg/issues/530
Workaround is to run the following:
$ cd node_modules/react-native-svg/
$ rm -rf ios/PerformanceBezier/ ios/QuartzBookPack/
$ npm run postinstall

Karma not running in Jenkins CI, Cannot find module 'karma-jasmine'

I'm setting up an Angular 4 SPA with automatic testing in Jenkins CI. The SPA is part of a larger, Maven-managed project, so the build is also Maven-managed. So far I've:
Installed the NodeJS plugin on Jenkins, using install from nodejs.org with version 8.6.0
Configured "Global npm packages to install" = "karma-cli phantomjs-prebuilt jasmine-core karma-jasmine karma-phantomjs-launcher karma-junit-reporter karma-coverage"
Added the "maven-karma-plugin" in pom.xml with browsers=PhantomJS / singleRun=true / reporters=dots,junit
Enabled "Provide Node & npm bin/ folder to PATH" on the Jenkins job configuration
The build process starts up quite ok, but eventually I get:
[INFO] --- maven-karma-plugin:1.6:start (default) # webclient ---
[INFO] Executing Karma Test Suite ...
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/karma start /var/lib/jenkins/workspace/funnel_build/webclient/karma.conf.js --browsers PhantomJS --reporters dots,junit --single-run
07 10 2017 17:07:52.801:ERROR [config]: Error in config file!
{ Error: Cannot find module 'karma-jasmine'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at module.exports (/var/lib/jenkins/workspace/funnel_build/webclient/karma.conf.js:9:7)
at Object.parseConfig (/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/karma/lib/config.js:410:5)
The npm install at the very beginning of the build logs:
$ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/npm install -g karma-cli phantomjs-prebuilt jasmine-core karma-jasmine karma-phantomjs-launcher karma-junit-reporter karma-coverage
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/karma -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/karma-cli/bin/karma
/var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/phantomjs -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/bin/phantomjs
> phantomjs-prebuilt#2.1.15 install /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt
> node install.js
Considering PhantomJS found at /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/bin/phantomjs
Looks like an `npm install -g`
Could not link global install, skipping...
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1507388835905/phantomjs-2.1.1-linux-x86_64 -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_8.6.0/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
npm WARN karma-jasmine#1.1.0 requires a peer of karma#* but none was installed.
npm WARN karma-junit-reporter#1.2.0 requires a peer of karma#>=0.9 but none was installed.
npm WARN karma-phantomjs-launcher#1.0.4 requires a peer of karma#>=0.9 but none was installed.
+ karma-phantomjs-launcher#1.0.4
+ karma-coverage#1.1.1
+ karma-jasmine#1.1.0
+ karma-cli#1.0.1
+ karma-junit-reporter#1.2.0
+ jasmine-core#2.8.0
+ phantomjs-prebuilt#2.1.15
updated 7 packages in 10.553s
(The reason the package 'karma' is currently not on the list is that I read somewhere that karma-cli should be used in place of karma. Adding the 'karma' package doesn't change anything, however.)
Any idea why that "Cannot find module 'karma-jasmine'" pops up? In (2) you'll see that the karma-jasmine package is listed, I find it on the server, but still it's not found by the NodeJS plugin.
Thanks, Simon
I managed to get it to work by running "npm install" as part of the build process, and then run everything on local npm packages.
The entire setup is described here: https://funneltravel.wordpress.com/2017/10/16/running-karma-with-maven-on-jenkins-ci/

Breeze.Server.WebApi2 Unable to locate Dependency WebActivator

When I try to add the package 'Breeze.Server.WebApi2' thru my package.json:
"dependencies": {
...
"System.Threading": "4.0.11-beta-23516",
"AutoMapper": "4.2.0",
"Breeze.Server.WebApi2": "1.5.4"
},
I get the error:
Restoring packages for D:\VSProjects\(...)\project.json
Unable to locate Dependency WebActivator
Writing lock file D:\VSProjects\(...)\project.lock.json
Restore complete, 354ms elapsed
Restoring packages for D:\VSProjects\(...)\project.json
Unable to locate Dependency WebActivator
Writing lock file D:\VSProjects\(...)\project.lock.json
Restore complete, 562ms elapsed
The nuget page of 'WebActivator' says it is deprecated...
I've already tried installing the package 'WebActivatorEx' but that didn't help.
How can I get the package installed? Is there another version?
Get the latest version, 1.5.5, just released yesterday. The dependency is changed to WebActivatorEx.

Resources