Error: Platform 'nodejs' version '14.17.1' is unsupported - node.js

I am trying to deploy Angular application to Azure. I created a static web app in Azure, and connected it to my Github main branch. When I run the action to deploy the app, I am getting an error in Build and Deploy action as Platform 'nodejs' version '14.17.1' is unsupported.
Here is the snippet of the error message:
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues
Oryx Version: 0.2.[20](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:21)220401.1, Commit: afed4f696a08bfd4c8e4109704a082bf9fb20515, ReleaseTagName: 20220401.1
Build Operation ID: |ZIeL+T275t4=.afcbd56a_
Repository Commit : 848b07de657ce2303e1469a882d68999bed7925a
Detecting platforms...
Error: Platform 'nodejs' version '14.17.1' is unsupported. Supported versions: 10.1.0, 10.10.0, 10.12.0, 10.14.2, 10.16.3, 10.18.0, 10.18.1, 10.19.0, 10.20.0, 10.20.1, 10.[21](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:22).0, 10.[22](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:23).0, 10.22.1, 10.[23](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:24).0, 10.[24](https://github.com/nimeshshrestha/autoglasslocator-admin-ui-v01/runs/7714362605?check_suite_focus=true#step:5:25).1, 12.11.0, 12.11.1, 12.12.0, 12.13.0, 12.14.0, 12.14.1, 12.16.0, 12.16.1, 12.16.2, 12.16.3, 12.18.0, 12.18.1, 12.18.2, 12.18.3, 12.18.4, 12.19.0, 12.20.0, 12.21.0, 12.22.0, 12.22.11, 12.22.4, 12.22.6, 12.22.9, 12.9.1, 13.9.0, 14.0.0, 14.1.0, 14.10.0, 14.10.1, 14.11.0, 14.12.0, 14.13.0, 14.13.1, 14.14.0, 14.15.0, 14.15.1, 14.16.0, 14.17.0, 14.17.4, 14.17.6, 14.18.3, 14.19.1, 14.2.0, 14.3.0, 14.4.0, 14.5.0, 14.6.0, 14.7.0, 14.8.0, 14.9.0, 15.0.0, 15.0.1, 15.1.0, 15.2.0, 15.2.1, 15.3.0, 16.13.1, 16.13.2, 16.14.0, 16.14.2, 16.5.0, 16.6.1, 16.8.0, 17.0.1, 17.1.0, 17.2.0, 17.3.1, 17.4.0, 17.5.0, 17.6.0, 4.4.7, 4.5.0, 4.8.0, 4.8.7, 4.9.0, 4.9.1, 6.10.3, 6.11.0, 6.11.5, 6.17.1, 6.2.2, 6.6.0, 6.9.3, 6.9.5, 8.0.0, 8.1.4, 8.11.2, 8.11.4, 8.12.0, 8.15.1, 8.16.1, 8.16.2, 8.17.0, 8.2.1, 8.8.1, 8.9.4, 9.4.0, 1.17.3, 1.18.0, 1.19.0, 1.19.1, 1.19.2, 1.20.0, 1.21.0, 1.21.1, 1.22.0, 1.22.1, 1.22.2, 1.22.4
---End of Oryx build logs---
Oryx has found build steps, but identified unsupported platform versions. Failing build.
I have tried to use setup-node action by following this link: https://github.com/actions/setup-node.
I edited the yml file, and added this:
steps:
- uses: actions/checkout#v2
- uses: actions/setup-node#v3 ### Added this line
with:
submodules: true
node-version: 16 ### Added this line
I have also looked at this issue: https://github.com/microsoft/Oryx/issues/650. But there is nothing that is helpful.
EDIT: I have also posted the question here https://github.com/microsoft/Oryx/issues/1504

Related

GitLab gemnasium-maven analyzer v3.11.1 fails dependency scan due to unsupported class file major version 61

I'm attempting to setup GitLab dependency scanning for a repository in my self-hosted GitLab server. I have included the job template and the test stage since I have overridden the stage clause. The job starts, but it fails soon after. When I set the variable SECURE_LOG_LEVEL to debug I see the following output.
$ /analyzer run
Using java version 'adoptopenjdk-17.0.2+8'
[INFO] [gemnasium-maven] [2023-01-28T15:21:00Z] [/go/src/app/cmd/gemnasium-maven/main.go:55] ▶ GitLab gemnasium-maven analyzer v3.11.1
[DEBU] [gemnasium-maven] [2023-01-28T15:21:00Z] [/go/src/app/finder/finder.go:64] ▶ inspect directory: .
[DEBU] [gemnasium-maven] [2023-01-28T15:21:00Z] [/go/src/app/finder/finder.go:96] ▶ skip ignored directory: .git
[DEBU] [gemnasium-maven] [2023-01-28T15:21:00Z] [/go/src/app/finder/detect.go:84] ▶ Selecting gradle for maven because this is the first match
[INFO] [gemnasium-maven] [2023-01-28T15:21:00Z] [/go/src/app/finder/finder.go:116] ▶ Detected supported dependency files in '.'. Dependency files detected in this directory will be processed. Dependency files in other directories will be skipped.
[DEBU] [gemnasium-maven] [2023-01-28T15:21:00Z] [/go/src/app/cmd/gemnasium-maven/main.go:234] ▶ Exporting dependencies for /path/to/my/app/build.gradle
[DEBU] [gemnasium-maven] [2023-01-28T15:21:05Z] [/go/src/app/builder/gradle/gradle.go:85] ▶ /path/to/my/app/gradlew --init-script /gemnasium-gradle-plugin-init.gradle gemnasiumDumpDependencies
Downloading https://services.gradle.org/distributions/gradle-7.1.1-bin.zip
..........10%...........20%...........30%..........40%...........50%...........60%..........70%...........80%...........90%...........100%
Welcome to Gradle 7.1.1!
Here are the highlights of this release:
- Faster incremental Java compilation
- Easier source set configuration in the Kotlin DSL
For more details see https://docs.gradle.org/7.1.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* Where:
Initialization script '/gemnasium-gradle-plugin-init.gradle'
* What went wrong:
Could not compile initialization script '/gemnasium-gradle-plugin-init.gradle'.
> startup failed:
> General error during conversion: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:189)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:170)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:156)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:277)
...
How can I resolve this issue? I am using GitLab server v15.7.5.
I found a StackOverflow thread that is very similar to the issue I'm having.
It appears the version of ASM bundled with GitLab gemnasium-maven analyzer v3.11 does not support class files version 61 in Java v17.0.2+8.
I was able to get this working by downgrading GitLab gemnasium-maven analyzer to v2.31.0 and have filed a support request with GitLab to notify them of the issue.
To downgrade the dependency scanner, add the following block of code to your CICD template
.ds-analyzer:
variables:
DS_MAJOR_VERSION: 2

Serverless | I can’t create a new project using AWS NodeJs template

Running serverless create --template aws-nodejs --path test in the terminal, I found an error:
C:\Users\p????>serverless create --template aws-nodejs --path test
(node:25984) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
Environment: win32, node 17.9.0, framework 3.12.0, plugin 6.2.1, SDK 4.3.2
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues
Error:
Could not download template. Ensure that you are using the latest version of Serverless Framework: EPERM: operation not permitted, open 'C:\Users\P????\AppData\Local\Temp\examples\aws-node-env-variables-encrypted-in-a-file\secrets.dev.yml.encrypted'

Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1

I begin new project with NativeScript, but after more and more try i couldn't fix my error.
After build my application with:
tns run android --device Pixel_4_API_30
i have this error :
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.**
...............................................................................................
My trace loge :
#############################################################################
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Debug level logging will leak security sensitive information!
https://docs.gradle.org/6.4/userguide/logging.html#sec:debug_security
#############################################################################
Command gradlew.bat failed with exit code 1
Will send the following information to Google Analytics: {
type: 'googleAnalyticsData',
category: 'CLI',
googleAnalyticsDataType: 'event',
action: 'Performance',
label: 'AndroidProjectService__buildProject',
customDimensions: { cd2: 'Angular', cd9: 'false', cd5: 'CLI' },
value: 3529
}
Error: Command gradlew.bat failed with exit code 1
at Errors.failWithOptions (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\common\errors.js:157:27)
at Errors.fail (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\common\errors.js:130:21)
at GradleCommandService.<anonymous> (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\services\android\gradle-command-service.js:40:30)
at Generator.throw (<anonymous>)
at rejected (C:\Users\BRYAN\AppData\Roaming\nvm\v12.13.0\node_modules\nativescript\lib\services\android\gradle-command-service.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
tns info :
√ Getting NativeScript components versions information...
√ Component nativescript has 7.2.0 version and is up to date.
‼ Update available for component #nativescript/core. Your current version is 7.1.4 and the latest available version is 7.3.0.
√ Component #nativescript/ios has 7.2.0 version and is up to date.
√ Component #nativescript/android has 7.0.1 version and is up to date.
Gradle is connected to Java so check your installed version is 8. If not then get the correct version and try again. ns doctor is your friend!
If that doesn't work, stop any java and emulator (android/qemu) related tasks/processes and try again.
If that fails try rebooting your computer and test again.

port isolation with bazel and linux

Trying to test out port isolation with bazel and linux and it fails.
My env is as following (started on aws):
$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ uname -mrs
Linux 3.16.0-4-amd64 x86_64
Bazel version
$ bazel version
Build label: 0.5.1
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 6 10:34:11 2017 (1496745251)
Build timestamp: 1496745251
Build timestamp as int: 1496745251
The repo: https://github.com/ittaiz/bazel-port-isolation
Running the test:
$ bazel test //...
____Loading package:
____Loading package: #bazel_tools//tools/cpp
____Loading package: #local_config_xcode//
____Loading package: #local_jdk//
____Loading package: #local_config_cc//
____Loading complete. Analyzing...
____Loading package: tools/defaults
____Loading package: #bazel_tools//tools/test
____Loading package: #junit_junit//jar
____Found 2 test targets...
____Building...
____[0 / 12] Expanding template SocketIsolation2Test
____[10 / 12] Building SocketIsolationTest.jar (1 source file)
FAIL: //:SocketIsolation2Test (see /home/builduser/.cache/bazel/_bazel_builduser/a589c0f8758972ab3aadcf172c468873/execroot/bazel-port-isolation/bazel-out/local-fastbuild/testlogs/SocketIsolation2Test/test.log)
PASS: //:SocketIsolationTest
____Elapsed time: 11.152s, Critical Path: 7.03s
//:SocketIsolationTest PASSED in 5.3s
//:SocketIsolation2Test FAILED in 0.3s
/home/builduser/.cache/bazel/_bazel_builduser/a589c0f8758972ab3aadcf172c468873/execroot/bazel-port-isolation/bazel-out/local-fastbuild/testlogs/SocketIsolation2Test/test.log
(As you can see - no sandbox failure or warnings)
The tet log show "Address already in use" - which means that there were no port isolation.
Why is it not working?
Found out why...
From here: https://bazel.build/versions/master/docs/bazel-user-manual.html#sandboxing
On some platforms such as Google Container Engine cluster nodes or
Debian, user namespaces are deactivated by default due to security
concerns. This can be checked by looking at the file
/proc/sys/kernel/unprivileged_userns_clone: if it exists and contains
a 0, then user namespaces can be activated with sudo sysctl
kernel.unprivileged_userns_clone=1.
The /proc/sys/kernel/unprivileged_userns_clone existed and had 0 in it.. . so changing it according to the insturction solved it.

Webstorm cannot recognize node Express both on Windows and Ubuntu

environment:
Webstorm v10.0.4
Node.js v0.12.5
Windows 8.1
Ubuntu 14.04
Just as the image showing below, on the pannel of creating 'Node.js Express App', Webstorm only finds Node and npm, but can not recognize Express.
Of course Express is installed globally, and I can create a Express project via express-generator on terminal.
➜ ~ npm -g list -depth=0
/usr/local/lib
├── bower#1.4.1
├── cheerio#0.19.0
├── express#4.13.0
├── express-generator#4.12.4
├── npm#2.11.2
└── nrm#0.2.5
And the idea.log as follow, not detail messages:
[ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
[ 93] INFO - #com.intellij.idea.Main - IDE: WebStorm (build #WS-141.1550, 12 Jun 2015 00:00)
[ 93] INFO - #com.intellij.idea.Main - OS: Windows 8 (6.2, x86)
[ 93] INFO - #com.intellij.idea.Main - JRE: 1.8.0_40-b26 (Oracle Corporation)
[ 93] INFO - #com.intellij.idea.Main - JVM: 25.40-b25 (Java HotSpot(TM) Server VM)
[ 109] INFO - #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx512m -XX:MaxPermSize=250m -XX:ReservedCodeCacheSize=150m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djb.vmOptions=D:\WebStorm 10.0.4\bin\WebStorm.exe.vmoptions -Xbootclasspath/a:D:\WebStorm 10.0.4\lib\boot.jar -Didea.platform.prefix=WebStorm -Didea.no.jre.check=true -Didea.paths.selector=WebStorm10
[ 281] INFO - #com.intellij.idea.Main - JNA library loaded (32-bit) in 172 ms
[ 296] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
[ 328] INFO - #com.intellij.idea.Main - Using "FocusKiller" library to prevent focus stealing.
[ 1920] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor js-nashorn-support.xml
[ 3094] INFO - llij.ide.plugins.PluginManager - 48 plugins initialized in 1909 ms
[ 3110] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (0.1), AngularJS (141.1550), CSS Support, CVS Integration (11), CoffeeScript (2.0), Cucumber.js (141.1550), Dart (141.1550), EJS (141.1550), EditorConfig (1.0), File Watchers (141.1550), Gherkin (999.999), Git Integration (8.1), GitHub, HAML, HTML Tools (2.0), Handlebars/Mustache (141.1550), IDEA CORE, IntelliLang (8.0), JSTestDriver Plugin (141.1550), Jade (141.1550), Java Server Pages Integration (1.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Karma (141.1550), LESS support, LiveEdit (999.0), Meteor (141.1550), NodeJS (141.1550), Perforce Integration (2.0), PhoneGap/Cordova Plugin (141.1550), Polymer & Web Components (141.1550), QuirksMode, REST Client, Refactor-X (2.01), Remote Hosts Access (0.1), SASS support, Spy-js (141.1550), Stylus support (141.1550), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TextMate bundles support (VERSION), W3C Validators (2.0), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML, hg4idea (10.0)
[ 4391] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=200; buffer=10; max=498008064
[ 4469] INFO - api.vfs.impl.local.FileWatcher - Starting file watcher: D:\WebStorm 10.0.4\bin\fsnotifier.exe
[ 4516] INFO - api.vfs.impl.local.FileWatcher - Native file watcher is operational.
[ 5474] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: []
[ 6709] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63343
[ 8931] INFO - pl.stores.ApplicationStoreImpl - 77 application components initialized in 5758 ms
[ 8965] INFO - .intellij.idea.IdeaApplication - App initialization took 10956 ms
[ 9614] INFO - ellij.project.impl.ProjectImpl - 16 project components initialized in 258 ms
[ 9614] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
[ 17941] INFO - odejs.packages.NodePackageUtil - Loading node package info for express-generator ...
[ 20427] INFO - odejs.packages.NodePackageUtil - Info for express-generator node package loaded successfully in 2478.9 ms
[ 21655] INFO - odejs.packages.NodePackageUtil - Loading node package info for express-generator ...
[ 22243] INFO - odejs.packages.NodePackageUtil - Info for express-generator node package loaded successfully in 577.0 ms
This problem is occured both on Ubuntu and Windows.
Your help is appreciated!
Updated:
Just as shown below, I use nrm to select the fastest npm mirror -- taobao, and Webstorm goes wrong with it. When changed back to npm' main repository,Webstormcan fetchexpress-generator` info, and everything is OK. Strange!
C:\Users\honghe>nrm ls
npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
* taobao - http://registry.npm.taobao.org/
edunpm - http://registry.enpmjs.org/
eu ----- http://registry.npmjs.eu/
au ----- http://registry.npmjs.org.au/
sl ----- http://npm.strongloop.com/
nj ----- https://registry.nodejitsu.com/
pt ----- http://registry.npmjs.pt/
C:\Users\honghe>nrm test
npm ---- 1646ms
cnpm --- 1275ms
* taobao - 4388ms
edunpm - 994ms
eu ----- 2422ms
au ----- 1040ms
sl ----- 1369ms
nj ----- 2176ms
pt ----- Fetch Error
Initially, WebStorm installs specified version of express-generator package in temporary directory. Then WebStorm uses it to generate a new Express project. WebStorm doesn't use already installed express or express-generator packages.
BTW, express-generator always installs express package locally to a new project, so already installed express packages cannot be reused anyway.
According to the screenshot, the problem is that Version: Unavailable (version of express-generator). The cause should be specified at the bottom of the dialog, below CSS combobox. Not sure, but probably, it might be caused by the lack of the Internet connection. More detailed error description can be found in idea.log (on the main menu "Help | Show Log in Explorer").
I stumbled on this question while looking for a resolution. Mine was a syntax error in the 'package.json' file. Either in the main project directory or the node install within Program Files. The IDE doesn't flag the error, it just states that its 'Unavailible'.
To resolve this do the following, open CMD - within the folder for the node instalation, Delete the package.json along with the node_modules folder. (Ensure the non default ones are backed up so you can get them back) Then run:
npm init
This will intialise npm and restore the default packages and package.json. This will in turn restore express-generator.

Resources