Hyperledger composer generator: Trying to copy from a source that doesn't exist (no concepts support for Angular) - hyperledger-composer

I have a composer-rest-server running on localhost:3000. To go with that, I tried to generate an Angular 2 app using yo hyperledger-composer. My business network models also have a abstract concept Spray{...} present.
I believe the documentation is outdated as I was presented with slightly different options than on the documentation. After choosing Angular and following through the steps, I got an
AssertionError: Trying to copy from source that does not exist ... /concept/concept.component.ts
Based on some quick google searches, I was able to find this issue on their Github - https://github.com/hyperledger/composer/issues/3927 however in my case, I am not even able to build the Angular app so I don't even get to the compilation stage.
Is there any way to build the app right now where it's at?

I've created a Github issue explaining steps to reproduce this and also included a hacky fix which is to comment out the lines in the generator code which copy over the concept files.
Link - https://github.com/hyperledger/composer/issues/4328

Related

Write an NFT Contract & mint your NFT [Figment.io Learning]

Working through the learning document on figment.io and am wondering what I'm missing. My thought is that the doc here is in need of some updating, but I could be wrong. First, The GitHub repo that we download in this lesson does not have the path /contracts/rust/Cargo.toml. Second, the repo is also missing a package.json which causes the initial attempt at yarn build:rs to fail. Creating a simple package.json like the following:
{
"name": "my-supercool-package"
}
Gets past the error indicating that the package.json cannot be found, but fails with the following:
yarn run v1.22.17
error Command "build:rs" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Is all of this a part of the test or is the doc on figment.io in need of updates?
You are right, the GitHub repo referred to on Figment does not contain the files and folders that you need to follow the tutorial. I'm guessing the original code on the GitHub repo has been updated since. It also looks like the tutorial on Figment is outdated. It refers to the NEP-4 standard
NEP-4, which is defined in a language-independent way that is more
compatible with NEAR.
However, it is not recommended as it is out of date and does not follow the standards the NEAR SDK has set currently. It's better to follow the NEP-171 standard instead.
That being said, I think I would follow the instructions on the GitHub repo directly. Maybe use the Figment tutorial as a supplement to understand the general principles (though the standard is different.)

Laravel QR code scanner

I'm interested in adding QR Scanner to my Laravel project, I found one that suits me it's called gruhn/vue-qrcode-reader there is also a written tutorial how to install it, but I just don't know where to add those codes or files. I've installed everything the problem is that I just don't know what to edit and how.
This is a late response: but for anyone who comes across this like me...
gruhn/vue-qrcode-reader was created using VueJS a Javascript Framework. Since you use Laravel: VueJS already comes preinstalled with Laravel depending on the version you use. You should also have Npm in order to use the npm run watch (the watcher).
Follow the installation steps found at their GitHub and then Simply create a new VueJS component and paste the code found in GitHub: gruhn/vue-qrcode-reader: while having a little understanding you can easily integrate this with Laravel by mounting the component where you wish to have the scanner in your project and viola it should work as advertised.
I hope this helps a bit.
You should try this one laravel package:-
https://github.com/werneckbh/laravel-qr-code
It would be best for you, because there are only few steps and that are too easy.

Using Babel in Production - How to precompile scripts

I'm building an application using Oracle Application Express (APEX) [so no existence of Node].
I have two issues which are somehow related concept-wise.
Issue #1:
I've included the React.js library in all of my pages to use some of its features.
I'm using babel to convert my JSX to simple JS. Everything's working fine.
But I keep on getting this warning in my console :
You are using the in-browser Babel transformer.
Be sure to precompile your scripts for production - https://babeljs.io/docs/setup/
I know I must precompile my scripts but I have no idea how. I visited the link and it got me all the more confused.
Issue #2:
The other issue I have is that I've got all my react related code in a separate .js file and I have embedded it in my page using this :
<script src="someJSFile.js" type="text/babel"></script>
Setting the type to "text/babel" raises this warning :
Fetching scripts with an invalid type/language attributes is deprecated
and will be removed in M56, around January 2017.
See https://www.chromestatus.com/features/5760718284521472 for more details.
Is there any workaround for this issue?
Issue 1: This is linked to what ever bunlder you choose (see issue 2 below). Which ever you do choose, will allow you to set the node env to production, which will put React in "production" mode - basically scraping out all the unneeded (but helpful) development messages and checks.
Issue 2: You will need some module bundler at the end of the day. Webpack is the goto at the moment. Webpack Site
Alternatives include:
Gulp + Browserify
Rollup
EDIT: I know you said "no node". You won't need node to run anything on the server, only on your local machine where you build the files. Node is easy to install on pretty much any local machine

How to setup react native to use flow?

I was wondering how I have to setup .flowConfig in order to use flow on a React- Native project. I created an empty .flowConfig file but as soon as I include the react-native module in a JS source file and check this file with flow, flow displays a 'not_found' error message.
Follow the instructions on https://flowtype.org/ to create your projects .flowconfig file, you can copy and paste it, you also have to install flow via brew install flow and add the flow binaries to your package.json, once you've done all this, you should be able to manually run flow and check for error types, but, that is not really optimal.
I haven't been able to set up flow on atom without using nuclide, I'm guessing with some digging around the packages you can find something that works that allows for on-the-fly flow checking.
The link provided by #jerome (https://egghead.io/lessons/react-setup-nuclide-to-use-flow-and-eslint-mac) is useful but only for nuclide installation, still worth a watch.
I advise to watch https://egghead.io/lessons/react-setup-nuclide-to-use-flow-and-eslint-mac it explains how to use Flow with Nuclide. I had issue to make flow works and my main mistake was that I didn't install flow (brew install flow). On the official site (https://flowtype.org/docs/getting-started.html) they don't mention you need to install flow (or it is not super obvious if it is the case).
Anyway watch the video it is great, it even explains ESLint :)

Project is missing in api (hence octo.exe can't find it)

We're using octo.exe to create releases. It starts suddenly giving error saying can't find project. I checked the api/projects and that's true, it is not in the returned json response. But when I look at the dashboard I can see the project. The only thing I did was cloning another project from this one earlier. The cloned project is working fine but not the original project.
It exists in dashboard (web gui) but not in api (hence octa.exe can't find project)
Looks like api is caching the projects. The new projects that I created via GUI not available in api.
Thanks,
I have had the same issue yesterday. It turns out to be something interesting. I believe that your project is still there properly set, but the total number of projects that you have become more than the listed ones in the API, and that's why the Octo.exe couldn't see it anymore.
I have explained here, how I managed to fix that issue quickly.
This is due to how pagination is implemented in Octopus (pretty poorly if you ask me). But you can override it. add this to the URL (at the end).
'?skip=0&take=2147483647'
alternatively, you can watch the json returned, if you find the links.Page.Next property you can use that link to get next page of the api response.

Resources