jsreport failing on looking up extensions - node.js

So I recently started working on a linux machine (ubuntu 16.04) and followed the installation instructions here http://jsreport.net/downloads/. When I run npm start --production I get
2016-09-13T16:51:57.134Z - info: Initializing jsreport in production mode using configuration file prod.config.json
2016-09-13T16:51:57.138Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/configuration for information how to get more performance.
2016-09-13T16:51:57.146Z - info: Searching for available extensions in /home/ross/rifiniti/optimo_ui/
2016-09-13T16:51:57.152Z - info: Extensions location cache not found, crawling directories
2016-09-13T16:51:57.317Z - error: Error occured during reporter init Error: ENOENT, no such file or directory '/home/ross/rifiniti/optimo_ui/ember/tmp/tree_merger-tmp_dest_dir-2yGnPLMA.tmp/optimo-ui/config'
at Error (native)
at Object.fs.statSync (fs.js:801:18)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:51:21
at Array.forEach (native)
at Object.exports.walkSync (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/util/util.js:44:10)
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/extensions/locationCache.js:50:20
From previous event:
at /home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:90:8
From previous event:
at Reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/node_modules/jsreport-core/lib/reporter.js:69:30)
at Reporter.reporter.init (/home/ross/rifiniti/optimo_ui/node_modules/jsreport/lib/extendInit.js:8:21)
at Object.<anonymous> (/home/ross/rifiniti/optimo_ui/server.js:1:85)
And I have no idea why. It was working fine on mac but now it is looking for this non-existent tmp file in ember. I'm at a loss, any help would be greatly appreciated!

SOLVED!
All I had to do was remove the tmp directory in ember and it worked.

Related

aws-azure-login "Unable to recognize page state!"

I have trawled the net on this one and cannot find a resolution.
I have deployed an EC2 instance from a AWS RHEL 8 AMI.
I have installed all the pre-requisites for aws-azure-login but cannot connect to my accounts over SAML. (https://github.com/sportradar/aws-azure-login)
The config file has been created with parameters. When running aws-azure-login it returns the username, I press enter and then it hangs for minutes and returns the following error:
Unable to recognize page state! A screenshot has been dumped to aws-azure-login-unrecognized-state.png. If this problem persists, try running with --mode=gui or --mode=debug
After running in debug i get the following output:
Logging in with profile 'default'...
Using AWS SAML endpoint https://signin.aws.amazon.com/saml
Error: Failed to launch the browser process!
[13527:13527:1220/050718.762168:ERROR:browser_main_loop.cc(1409)] Unable to open X display.
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/usr/lib/node_modules/aws-azure-login/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.<anonymous> (/usr/lib/node_modules/aws-azure-login/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (events.js:412:35)
at Interface.emit (domain.js:475:12)
at Interface.close (readline.js:530:8)
at Socket.onend (readline.js:254:10)
at Socket.emit (events.js:412:35)
at Socket.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
Node version = v14.18.2
Any pointers would be greatly appreciated.
Note: on Linux you will likely need to disable the Puppeteer sandbox
or Chrome will fail to launch:
aws-azure-login --no-sandbox
If not check Unable to open X display when trying to run google-chrome on Centos (Rhel 7.5)
I bumped into same issue on CentOS7
aws-azure-login --profile <profile_name> --no-prompt --no-sandbox --enable-chrome-network-service --no-verify-ssl
worked for me, hope I helped anyone
I was getting the same error but then I end up recreating a new profile name. This time, I made sure that my profile name was one word, all lower case, and only characters was used. Example: automation

Flutter Web - error output points to JS file instead of dart file

I have a Flutter Web project, and when an error is thrown, I can't open the dart file where the error was thrown, because the error line points to a JS file:
Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
This app is linked to the debug service: ws://127.0.0.1:63045/gOvW2paMrLg=/ws
Debug service listening on ws://127.0.0.1:63045/gOvW2paMrLg=/ws
Running with sound null safety
Debug service listening on ws://127.0.0.1:63045/gOvW2paMrLg=/ws
Error: Invalid argument(s): A value must be provided. Supported values: 0, 1
at Object.throw_ [as throw] (http://localhost:53846/dart_sdk.js:5061:11)
at Object._$36enumDecode [as _$enumDecode] (http://localhost:53846/packages/web_app/core/models/pessoa/pessoa.dart.lib.js:482:17)
at Object._$36PessoaFromJson [as _$PessoaFromJson] (http://localhost:53846/packages/web_app/core/models/pessoa/pessoa.dart.lib.js:473:54)
at Function.fromJson (http://localhost:53846/packages/web_app/core/models/pessoa/pessoa.dart.lib.js:375:21)
at http://localhost:53846/packages/web_app/repository/pessoa_repository.dart.lib.js:60:193
at repository.RepositoryGetter.new.getRecurso (http://localhost:53846/packages/web_app/repository/repository.dart.lib.js:33:18)
at getRecurso.next (<anonymous>)
at http://localhost:53846/dart_sdk.js:38640:33
at _RootZone.runUnary (http://localhost:53846/dart_sdk.js:38511:59)
at _FutureListener.thenAwait.handleValue (http://localhost:53846/dart_sdk.js:33713:29)
at handleValueCallback (http://localhost:53846/dart_sdk.js:34265:49)
at Function._propagateToListeners (http://localhost:53846/dart_sdk.js:34303:17)
at _Future.new.[_completeWithValue] (http://localhost:53846/dart_sdk.js:34151:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:53846/dart_sdk.js:34172:35)
at Object._microtaskLoop (http://localhost:53846/dart_sdk.js:38778:13)
at _startMicrotaskLoop (http://localhost:53846/dart_sdk.js:38784:13)
at http://localhost:53846/dart_sdk.js:34519:9
How can I make it to show the dart file where the error occurred, instead of a JS file?
I'm using Flutter Channel stable 2.5.2, Android Studio version 2020.3.
I have found a workaround for this issue.
You basically have to install a third-party patch; it will translate the paths in JS and point to the right line in dart file.
Download the patch and follow the instructions here: https://github.com/obeobe/flutter-web-exception-mapper
Optionally you can see trace of dart files in the browser.
Make sure you have source maps enabled in your browser.
got the answer from this link on github

Ember build failed

I'm trying run an Ember project locally : https://github.com/cosmicjs/ember-real-estate-website?files=1. I'm using pycharm 2017 using git-bash as my terminal in win7. I have npm , node and ember installed . In pycharm my project looks like the screenshot.
After switching to the cosmic-real-estate folder:
$ ember build
Running without permission to symlink will degrade build performance.
See http://ember-cli.com/user-guide/#windows for details.
cleaning up...
Build failed.
The Broccoli Plugin: [Funnel: Funnel: index.html] failed with:
Error: EISDIR: illegal operation on a directory, symlink 'e:\ember-real-estate-website\cosmic-real-estate\app' -> 'e:\ember-real-estate-website\cosmic-real-estate\tmp\funnel-input_base_path-ZStiRJkX.tmp'
at Error (native)
at Object.fs.symlinkSync (fs.js:1069:18)
at symlinkWindows (e:\ember-real-estate-website\cosmic-real-estate\node_modules\symlink-or-copy\index.js:123:18)
at symlinkOrCopySync (e:\ember-real-estate-website\cosmic-real-estate\node_modules\symlink-or-copy\index.js:63:5)
at e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-plugin\read_compat.js:86:11
at tryCatch (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:539:12)
at invokeCallback (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:554:13)
at publish (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:522:7)
at flush (e:\ember-real-estate-website\cosmic-real-estate\node_modules\rsvp\dist\rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
The broccoli plugin was instantiated at:
at Funnel.Plugin (e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-plugin\index.js:7:31)
at new Funnel (e:\ember-real-estate-website\cosmic-real-estate\node_modules\broccoli-funnel\index.js:58:10)
at EmberApp._rawAppIndex (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:694:12)
at EmberApp.index (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:678:20)
at EmberApp.toArray (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:1661:12)
at EmberApp.toTree (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\broccoli\ember-app.js:1684:38)
at module.exports (e:\ember-real-estate-website\cosmic-real-estate\ember-cli-build.js:26:14)
at Builder.setupBroccoliBuilder (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\models\builder.js:56:19)
at new Builder (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\models\builder.js:30:10)
at BuildTask.run (e:\ember-real-estate-website\cosmic-real-estate\node_modules\ember-cli\lib\tasks\build.js:15:19)
There is a new node_modules folder visible as well:
How can I get this working?

How to release resource \AppData\Local\Temp\shelljs_60d55c70cdc922162f4b without removing antivirus or reinstalling node?

I'm running Ionic2 to build windows app. but it is giving me following error:
shell.js: internal error
Error: EBUSY: resource busy or locked, open 'C:\Users\edge\AppData\Local\Temp\shelljs_60d55c70cdc922162f4b'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.writeFileSync (fs.js:1333:33)
at execSync (C:\Users\edge\AppData\Roaming\npm\node_modules\ionic\node_modules\shelljs\src\exec.js:67:57)
at Object._exec (C:\Users\edge\AppData\Roaming\npm\node_modules\ionic\node_modules\shelljs\src\exec.js:179:12)
at Object.exec (C:\Users\edge\AppData\Roaming\npm\node_modules\ionic\node_modules\shelljs\src\common.js:168:23)
at Object.gatherGulpInfo (C:\Users\edge\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\info.js:201:24)
at Object.t (C:\Users\edge\AppData\Roaming\npm\node_modules\ionic\lib\utils\stats.js:148:15)
at Object.run (C:\Users\edge\AppData\Roaming\npm\node_modules\ionic\lib\cli.js:135:16)
at Object.<anonymous> (C:\Users\edge\AppData\Roaming\npm\node_modules\ionic\bin\ionic:13:10)
I sow a same error:
Ionic run android - Internal Error
But I don't want to remove my antivirus and reinstall nodeJS.
But when I restart my system and immediately after I run the command It works(Possibly some process takes time to execute which one access this resource)
Snapshot of process running on my system are as follows:
I faced the same issue , and resolved it by uninstalling bytefence anti malware . it actually use the same resource mentioned above .(I checked in dell laptop)

Error: Invalid or corrupt jarfile occured while trying to build recommendation engine of PredictionIO in Linux machine

Error occured while trying to build the recommendation engine using PredictionIO. Please anyone know how to solve this issue.
root#testing:~/PredictionIO/engines# pio build --verbose
[INFO] [Console$] Using command '/root/PredictionIO/sbt/sbt' at the current working directory to build.
[INFO] [Console$] If the path above is incorrect, this process will fail.
[INFO] [Console$] Uber JAR disabled. Making sure lib/pio-assembly-0.9.4.jar is absent.
[INFO] [Console$] Going to run: /root/PredictionIO/sbt/sbt package assemblyPackageDependency
[ERROR] [Console$] Error: Invalid or corrupt jarfile /root/PredictionIO/sbt/sbt-launch-0.13.7.jar
[ERROR] [Console$] Return code of previous step is 1. Aborting.
For me help to download this file
https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.7/sbt-launch.jar
Rename downloaded file to sbt-launch-0.13.7.jar and replace previous file in PredictionIO/sbt/

Resources