netsuite-suitecloud-sdk
netsuite-suitecloud-sdk copied to clipboard
No JAR file in our CLI for Node.js
Your environment
OS : Ubuntu 20.04.2 LTS Node.js version : 14.17.4 suitecloud-cli version : 1.5.0 Terminal/CMD tool : Bash
Describe the bug
With previous versions our CI TeamCity would perform account setup without issues. Now, the following error is received: There is no JAR file in your CLI for Node.js. Run "npm install" from "/home/me/.nvm/versions/node/v14.17.4/lib/node_modules/@oracle/suitecloud-cli" to install the JAR file.](https://github.com/oracle/netsuite-suitecloud-sdk/issues/420)
To Reproduce
Steps to reproduce the behavior:
- suitecloud account:setup -i
- Observe error
Actual Behavior
There is no JAR file in your CLI for Node.js. Run "npm install" from "/home/me/.nvm/versions/node/v14.17.4/lib/node_modules/@oracle/suitecloud-cli" to install the JAR file.](https://github.com/oracle/netsuite-suitecloud-sdk/issues/420)
Expected Behavior
Expect it to make the prompt for Browser or Token auth
Additional context
This does work in Windows environments
Same behavior here without sudo
command before suitecloud
...
@Rvice Please uninstall the suitecloud-cli with sudo command if you installed it with sudo.
Make sure by executing suitecloud
command and see it's not installed.
Fix the problems with NPM permissions issues, which is forcing you to use sudo.
Then install suitecloud-cli without sudo
and this should fix the issues of jar.
@eklonsousa Are you still getting this issue?
We are getting this with the latest CLI version 1.6.0
on Windows. I have 4 new devs at a standstill while the devs coding in repos that use 1.0.4
are not impacted. Bout to open a ticket with NS.
We have gone thru disabling proxies, checking certs and CAs, admin vs non-admin, new machine w/ fresh node.js vs old machine w/ node.js, re-installing node and cant get past this missing JAR error and the unable to get local issuer certificate
error
@shannonmccleary-ihm What error are you getting?
Not that 1.6.0
requires java 17!
Can you confirm that Devs having issue have java 17 installed?
If not, please install 17 and then try installing npm i @oracle/suitecloud-cli
@alii-gator, thank you! we will give this a try, we were going by the instructions in /app/help/helpcenter.nl?fid=section_1558708810.html
which mention JDK 11. I hope this fixes it! Thank you so much for the quick reply
@alii-gator we started from scratch on the new machines and also performed the tasks below but still getting the same errors. Any tips would be greatly appreciated. My gut is telling me this may be a cert/firewall issue on our new machines
- removed all node_modules in Roaming and in the local sourcecode folder
- installed JDK 17
- installed using
npm i @oracle/suitecloud-cli
instead ofnpm i @oracle/[email protected]
Java Version
$ java -version
java version "17.0.4.1" 2022-08-18 LTS
Java(TM) SE Runtime Environment (build 17.0.4.1+1-LTS-2)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
Tail of Node Error Log
...
354 timing reify:unpack Completed in 2738ms
355 timing reify:unretire Completed in 0ms
356 timing build:queue Completed in 2ms
357 timing build:link:node_modules/@oracle/suitecloud-cli Completed in 6ms
358 timing build:link:node_modules/@oracle/suitecloud-cli/node_modules/vm2 Completed in 5ms
359 timing build:link:node_modules/@oracle/suitecloud-cli/node_modules/acorn Completed in 6ms
360 timing build:link Completed in 6ms
361 info run @oracle/[email protected] postinstall node_modules/@oracle/suitecloud-cli node postinstall.js
362 info run @oracle/[email protected] postinstall { code: 4294967295, signal: null }
363 timing reify:rollback:createSparse Completed in 1414ms
364 timing reify:rollback:retireShallow Completed in 0ms
365 timing command:install Completed in 6994ms
366 verbose stack Error: command failed
366 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:63:27)
366 verbose stack at ChildProcess.emit (node:events:513:28)
366 verbose stack at maybeClose (node:internal/child_process:1093:16)
366 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
367 verbose pkgid @oracle/[email protected]
368 verbose cwd C:\Users\1133263\WebstormProjects\NetSuite
369 verbose Windows_NT 10.0.19044
370 verbose node v16.17.0
371 verbose npm v8.15.0
372 error code 4294967295
373 error path C:\Users\1133263\AppData\Roaming\npm\node_modules\@oracle\suitecloud-cli
374 error command failed
375 error command C:\Windows\system32\cmd.exe /d /s /c C:\Users\1133263\AppData\Local\Temp\postinstall-20f08e54.cmd
376 error There was an error when downloading SuiteCloud SDK dependency from https://system.netsuite.com/download/suitecloud-sdk/22.2/cli-2022.2.0.jar
376 error Error: unable to get local issuer certificate
377 verbose exit 4294967295
378 timing npm Completed in 7084ms
379 verbose unfinished npm timer reify 1663255247171
380 verbose unfinished npm timer reify:build 1663255252116
381 verbose unfinished npm timer build 1663255252116
382 verbose unfinished npm timer build:deps 1663255252117
383 verbose unfinished npm timer build:run:postinstall 1663255252125
384 verbose unfinished npm timer build:run:postinstall:node_modules/@oracle/suitecloud-cli 1663255252125
385 verbose code 4294967295
386 error A complete log of this run can be found in:
386 error C:\Users\1133263\AppData\Local\npm-cache\_logs\2022-09-15T15_20_47_083Z-debug-0.log
@shannonmccleary-ihm Is this in a CI/CD setup? If so, make sure to run the following:
npm install -g --acceptSuiteCloudSDKLicense @oracle/suitecloud-cli
I haven't tried again in Linux, but I do have 1.6.0 running on my windows machine with JDK 17 installed.
@Rvice Yes we tried that as well. This is for a manual install on a new windows laptop
@shannonmccleary-ihm Ok lets check few more things. Can you please check that node 16 LTS is installed. Can you try installation with global flag? npm install -g @oracle/suitecloud-cli
Are you able to npm i anything else?
@alii-gator Indeed, we have tried global and non-global variations of the install command. We have also tried installing it locally in the project by adding it to package.json
and running npm install
. Node is v16 LTS and JDK is v17
verbose Windows_NT 10.0.19044
verbose node v16.17.0
verbose npm v8.15.0
java version "17.0.4.1" 2022-08-18 LTS
Java(TM) SE Runtime Environment (build 17.0.4.1+1-LTS-2)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
We have our support team checking if the unable to get local issuer certificate
may be due to a proxy/firewall caused by corp software on these new machines. Thank you again for your help!
@alii-gator yes we can install other modules without any issues
@shannonmccleary-ihm Ok, I think its an issue on your machine. Hopefully you can fix this. just an FYI: https://stackoverflow.com/questions/36494336/npm-install-error-unable-to-get-local-issuer-certificate
@alii-gator @Rvice Great news! There were indeed some proxy issues with ZScaler, installed in all new machines. We got it resolved with our support and was able to install the module with no errors after they added some rules and "magic". Thank you again for tips! You guys rock
FYI, still having the issue with Java 17, but still not on node 16. Node 14. When I can get a chance to update our CI/CD to 16 I'll test again.
Just tried 1.6.1 on Linux. Note, Windows works fine
Found something about adding "sudo" before account:setup, will need to update my powershell files to insert that if Windows is not found or make a docker image.
@eklonsousa Are you still getting this issue?
Yes! I'm still facing the issue with a new machine and another OS (OSx).
src % suitecloud project:validate
Unexpected error encountered.
@eklonsousa Hi, the original error reported for this issue was different from "Unexpected error encountered". Are you sure the current error is related to downloading JAR dependency? As for the JAR dependency there is no issue with JAR availability, if you have the problem downloading it it is most likely related to your environment setup (proxy, vpn, file system permissions). You may want to re-install the CLI on public network (with proxy or VPN disabled), please also make sure you use the documented JDK and Node.js versions.