Yarn upgrade-interactive always to `exotic` - upgrade

I'm playing around with a centralized build setup which is hosted on github: https://github.com/skybrud/sky-build-setup/tree/master
In the npm module this repo is used, I have the following package.json:
{
"name": "sky-crop",
"version": "1.0.5",
"description": "Vue component for cropping images",
"main": "dist/skycrop.js",
"scripts": {
"vanilla": "rimraf ./node_modules && yarn run dist",
"build": "rimraf ./dist && webpack --config ./webpack.config.js",
"dist": "yarn install && yarn run build"
},
"build": "module",
"author": "Skybrud.dk",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/skybrud/sky-crop.git"
},
"dependencies": {
"sky-window": "^1.0.4"
},
"devDependencies": {
"sky-build-setup": "https://github.com/skybrud/sky-build-setup.git#semver:^1.0.0"
}
}
Here's my issue. When running yarn upgrade-interactive I always get the following:
For some reason the to part always refers to exotic in stead of being up to date.
Can someone point me in the right direction about what is going on?
And what does exotic exactly mean? I haven't been able to locate the description anywhere.

Yarn can't manage dependencies versions for dependencies not belonging to the npm packages repository.
In your case, the devDependency sky-build-setup is resolved using a github url, where yarn doesn't have a way of knowing if there is a new version of the dependency nor how to update it. The dependencies not belonging to npm (i.e. the ones resolved via urls or file:) are marked as exotic in the interactive-upgrade process.
On the other hand, the dependency sky-window comes from npm and yarn can assess if you are using the latest version and eventually update it for you.

Related

How to deploy a budo/browserify project's build to GitHub Pages?

I want to deploy a clone of this Virtual Art Gallery project to GitHub Pages.
However, I'm only able to deploy the base html site rather than the build site which shows a 404 page on GitHub.
Steps I've taken:
Created a GitHub Pages site at USER.github.io and added the code below to the package.json:
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
In another run I created a new repo USER.github.io/REPO and added the code below to package.json:
"homepage": "https://USER.github.io/REPO",
...
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
I've installed gh-pages and ran npm start, npm run build, npm run deploy.
In some attemps, deploy returned Error: ENOENT: no such file or directory, stat 'directory/BUILD' but I fixed this by running npm start first.

Getting an error after my deployment on vercel

I have been looking around on google and stackoverflow and it seems I am not able to get a clear answer..
There is a deployment error in the building stage on vercel..
Below is my log...
[01:02:45.988] Cloning github.com/SinHope/myportfolion (Branch: main, Commit: be09e5f)
[01:02:46.443] Cloning completed: 455.353ms
[01:02:46.865] Looking up build cache...
[01:02:47.158] Build Cache not found
[01:02:47.194] Running "vercel build"
[01:02:47.699] Vercel CLI 28.4.10-6fa5d8b
[01:02:47.999] Installing dependencies...
[01:03:02.453] npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
[01:03:03.334] 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.
[01:03:03.347] npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
[01:03:03.367] npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
[01:03:03.615] npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
[01:03:03.924] npm WARN deprecated sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
[01:03:04.153] npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
[01:03:04.218] 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
[01:03:04.681] npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[01:03:05.871] npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
[01:03:06.743] npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
[01:03:08.274] npm WARN deprecated har-validator#5.1.5: this library is no longer supported
[01:03:08.708] npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
[01:03:09.156] npm WARN deprecated html-webpack-plugin#4.0.0-beta.11: please switch to a stable version
[01:03:09.488] npm WARN deprecated eslint-loader#3.0.3: This loader has been deprecated. Please use eslint-webpack-plugin
[01:03:09.559] npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
[01:03:11.543] npm WARN deprecated babel-eslint#10.1.0: babel-eslint is now #babel/eslint-parser. This package will no longer receive updates.
[01:03:12.476] npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
[01:03:12.512] npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
[01:03:12.977] npm WARN deprecated #hapi/address#2.1.4: Moved to 'npm install #sideway/address'
[01:03:13.482] npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
[01:03:14.223] npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[01:03:14.341] npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
[01:03:16.132] npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
[01:03:23.231] 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.
**[01:03:29.509] npm ERR! code 1
[01:03:29.509] npm ERR! path /vercel/path0/node_modules/core-js-pure
[01:03:29.510] npm ERR! command failed
[01:03:29.510] npm ERR! command sh -c node -e "try{require('./postinstall')}catch(e){}"
[01:03:29.510] npm ERR! node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
[01:03:29.510] npm ERR! node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
[01:03:29.512]
[01:03:29.512] npm ERR! A complete log of this run can be found in:
[01:03:29.512] npm ERR! /vercel/.npm/_logs/2022-10-14T17_02_48_321Z-debug-0.log
[01:03:29.574] Detected `package-lock.json` generated by npm 7+...
[01:03:29.574] Running "npm run build"
[01:03:29.887]
[01:03:29.888] > myportfolion#0.0.0 build
[01:03:29.888] > vite build
[01:03:29.888]
[01:03:29.894] sh: vite: command not found
[01:03:29.912] Error: Command "npm run build" exited with 127**
It seems from [01:03:29.509] there are multiple errors...
And it seems coming from my package.json file..
Package.json
{
"name": "myportfolion",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"#emailjs/browser": "^3.7.0",
"hover.css": "^2.3.2",
"latest": "^0.2.0",
"node": "^18.9.1",
"prettier": "^2.7.1",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-router-dom": "^6.4.2",
"react-scripts": "^3.2.0"
},
"devDependencies": {
"#types/react": "^18.0.17",
"#types/react-dom": "^18.0.6",
"#vitejs/plugin-react": "^2.1.0",
"vite": "^3.1.0"
},
"main": "vite.config.js",
"repository": {
"type": "git",
"url": "git+https://github.com/SinHope/myportfolion.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/SinHope/myportfolion/issues"
},
"homepage": "https://github.com/SinHope/myportfolion#readme",
"description": ""
}
I just cant seem to debug this after many hours.
Would anyone know what's the problem here?

Deploy a custom UI5 library in SAP BAS

I need to build some custom Fiori libraries with SAPUI5.
On the internet, I found many tutorials about how to build such libraries but no tutorial shows how I can deploy it. The only tutorials I found about the deployment are using the old Web IDE but we're using the SAP BAS (SAP Business Application Studio) which doesn't have those functions.
So then I learned about how SAP handles the custom libraries and tried to deploy it like a normal Fiori app by creating a ui5-deploy.yaml:
specVersion: '2.5'
metadata:
name: 'zcalibtest'
type: library
builder:
resources:
excludes:
- /test/**
- /localService/**
customTasks:
- name: deploy-to-abap
afterTask: generateCachebusterInfo
configuration:
target:
destination: {DESTINATION}
url: {URL}
credentials:
username: env:DEPLOY_USERNAME
password: env:DEPLOY_PASSWORD
app:
name: Z_CA_LIB_TEST
package: ZCA_TEST
transport: {TRANSPORT}
... and running the following NPM "deploy" script:
npm run build && fiori deploy -y --config ui5-deploy.yaml && rimraf archive.zip
But that gives me the following error:
sh: 1: fiori: not found
So I think that's not the way to go. But how can I do this? I couldn't be the only person on the planet that is using SAP BAS and tries to deploy a custom library.
Edit:
My package.json file:
{
"name": "zcalibtest",
"version": "1.0.0",
"private": true,
"devDependencies": {
"#ui5/cli": "^2.9.3",
"#sap/ux-ui5-tooling": "^1.5.5",
"karma": "^6.1.1",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-ui5": "^2.3.3",
"ui5-middleware-livereload": "^0.5.1"
},
"ui5": {
"dependencies": [
"ui5-middleware-livereload"
]
},
"scripts": {
"build": "ui5 build --clean-dest",
"deploy": "npm run build && fiori deploy -y --config ui5-deploy.yaml && rimraf archive.zip",
"start": "ui5 serve --open test-resources/path/to/lib/zcalibtest/Example.html",
"testsuite": "ui5 serve --open test-resources/path/to/lib/zcalibtest/qunit/testsuite.qunit.html",
"test": "karma start --browsers=ChromeHeadless --singleRun=true"
},
"license": "UNLICENSED"
}
For the deploy part: you need to add the package "#sap/ux-ui5-tooling" (both in your devDependencies and in your ui5 dependencies) and rimraf (only in your devDependencies).
For the build part: build steps for libraries are slightly different so yours should be similar to these (maybe you don't need all the steps..). For the building part you need to add only bestzip to your devDependencies I guess
"scripts": {
"build": "npm run clean && ui5 build --include-task=generateManifestBundle generateCachebusterInfo && npm run flatten && npm run clean-after-flatten && npm run zip",
"zip": "cd dist && npx bestzip ../ExampleLibrary-content.zip *",
"flatten": "cp -r dist/resources/name/space/examplelibrary/* dist && cp dist/resources/name/space/examplelibrary/.library dist ",
"clean": "npx rimraf ExampleLibrary-content.zip dist",
"clean-after-flatten": "rm -rf dist/resources dist/test-resources"
}
You can find more info about building libraries in this blog post from the SAP Community.

How to deploy npm project to gh-pages

I'm trying to deploy a website to gh-pages using npm. I'm using blain HTML and CSS and asynchronous javascript. I haven't used any SPA framework (react or angular).
I'm currently using lite server for development purposes and gh-pages package.
I'm trying to deploy the src folder using the following command
npm run deploy
it fails because the build script is not specified.
my question is what should I write in the build script?
when I try to run npm run deploy it displays the following error
'src' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! AmrAhmed#1.0.0 build: `src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the AmrAhmed#1.0.0 build 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! C:\Users\Amr\AppData\Roaming\npm-cache\_logs\2020-05-30T11_30_29_824Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! AmrAhmed#1.0.0 predeploy: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the AmrAhmed#1.0.0 predeploy 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! C:\Users\Amr\AppData\Roaming\npm-cache\_logs\2020-05-30T11_30_29_869Z-debug.log
in similar projects using react, the build script has the following react-scripts build
this is my package.json file
{
"name": "AmrAhmed",
"version": "1.0.0",
"description": "",
"main": "truffle.js",
"directories": {
"test": "test"
},
"scripts": {
"dev": "lite-server",
"test": "echo \"Error: no test specified\" && exit 1",
"build": "src",
"predeploy": "npm run build",
"deploy": "gh-pages -d src"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gh-pages": "^3.0.0",
"lite-server": "^2.5.4"
}
}
election folder content
src folder content
I found out that you don't need the build script or the pre-deploy script. they are unnecessary to be used, since my website is static, I can navigate directly to the build folder and it will work fine.
I have modified the config.json file to be as in the following
{
"name": "AmrAhmed",
"version": "1.0.0",
"description": "",
"main": "truffle.js",
"directories": {
"test": "test"
},
"scripts": {
"dev": "lite-server",
"test": "echo \"Error: no test specified\" && exit 1",
"deploy": "gh-pages -d src"
},
"author": "",
"license": "ISC",
"devDependencies": {
"gh-pages": "^3.0.0",
"lite-server": "^2.5.4"
}
}
run the command
npm run build
and it will be deployed to Github pages.
you should also add "homepage":"https://yourGithub.github.io/your-repo" above "name" in the package.json

How to fork and npm install in my project

I have a package
I would like to fork it, edit some stuff in order to make it fit into my project, but keep the ability to update from the original master.
I forked the project, and now I am stuck because when I npm install it, I have "unknown module angular-cesium"
the package.json scripts is has follow :
"scripts": {
"ng": "ng",
"demo:start": "ng serve",
"demo:build": "ng build --prod",
"demo:server": "nodemon --exec ts-node --project demo-server/tsconfig.json -- demo-server/src/main.ts",
"lib:build": "ng build angular-cesium; npm run copy:extra-files",
"lib:start": "ng build angular-cesium --watch",
"lib:publish": "npm run lib:build; cd dist/angular-cesium; npm publish; cd ...; npm run docs:push",
"test": "ng test angular-cesium",
"test:ci": "ng test angular-cesium --no-watch --browsers=ChromeHeadless",
"lint": "ng lint angular-cesium",
"e2e": "ng e2e",
"gh-pages": "gh-pages -d docs -b gh-pages",
"copy:extra-files": "cp README.md LICENSE.txt dist/angular-cesium",
"docs:run": "compodoc -p projects/angular-cesium/src/lib/tsconfig.compodoc.json --theme stripe -d docs -n \"Angular Cesium\" --watch --serve",
"docs:compile": "rimraf docs && compodoc -p projects/angular-cesium/src/lib/tsconfig.compodoc.json --theme stripe -d docs -n \"Angular Cesium\"",
"docs:push": "npm run docs:compile && npm run gh-pages && rimraf docs",
"heroku-postbuild": "npm run lib:build; npm run demo:build"
},
I tried to add "prepare:npm run lib:build"
I have the follow error :
Project 'angular-cesium;' does not support the 'build' target.
if I just try a npm publish I get the following
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\Popolee\AppData\Local\Temp\npm-33912-632e340c\tmp\fromDir-ffb525d2\package.tgz'
My question is, how can I fork this library, and make a npm installable custom version that I can edit and install in my project when i want