Can't install Twig with composer - twig

I'm trying to install Twig with composer require twig/twig but get back:
Could not find package twig/twig. Did you mean one of these? twig/twig
So it's suggesting to me the package I'm trying to install that it says it can't find.
Has anyone else had this before?

Reverting to Composer 1.x could potentially cause problems down the line (in addition to being much more memory-intensive than Composer 2.x), especially if you're working on multiple projects on your machine.
What about running:
composer require twig/twig:^1.0 (For Twig 1.x)
composer require twig/twig:^2.0 (For Twig 2.x)

Turns out my problem was I'd upgraded to Composer 2. When I reverted back to 1 I was able to install.

Related

Compatibility issues Node and Strapi4

allow me to walk you through some problems I'm encountering when setting up Gatsby with Strapi. Hopefully, somebody can provide me with a solution. Whenever I use the following command yarn create strapi-starter strapi-test gatsby-blog I get the following error:
So what I do next is switching to node v15 using nvm to make strapi compatible with node. The result being that some packages are being installed followed by yet another compatibility error:
Therefore, I am wondering what I am doing wrong and how to make strapi4 compatible with node without having the errors above?
Use Node.js v16 rather than v15. It should fix the issue.
Besides, it's better to use even-numbered version of Node.js, as they're LTS.

Problem on changing Hyperledger Composer version from 0.16.60 to 0.19.14

I am new in blockchain development. Actually i done a demo in composer vertion .16.6. Now i upgrade my composer vertion from 0.16.6 to 0.19.14. And i changed the code in createPeerAdmin.sh file for suitable to vertion 0.19.14. But always showing an error that
Connection profile has no x-type property defined. It is not valid for this version of composer
Please help me as possible.
Thanks
try to reset the environment variable for before starting or setup the development server using the following command by changing the fabric version u're going to use specific version from the development servers.
cd ~/fabric-dev-servers
export FABRIC_VERSION=hlfv11
./startFabric.sh
./createPeerAdminCard.sh
You can also find better information about the installation of the documentation in the link below:
https://hyperledger.github.io/composer/v0.19/installing/development-tools.html

Nodejs cannot access Hyperledger composer showing errors

I am trying to build an example application using nodejs and Hyperledger-composer.
My system is Ubuntu 16.04. and I installed nodejs v8.10 using NVM.
I am following the tutorial on the official Hyperledger composer (check here).
The problem I am having is on the connect() function to my "admin#borrow-network" business network:
this.businessNetworkDefinition = this.bizNetworkConnection.connect('admin#borrow-network');
The error that I am getting is the following:
Error: Failed to load connector module "composer-connector-hlfv1" for connection type "hlfv1". Must create ConnectionManager with a ConnectionProfileManager implementation.
I tried to include additional parameters inside the connect() function:
.connect('PeerAdmin#hlfv1', 'admin#borrow-network','admin','adminpw');
Then it showed a different error
UnhandledPromiseRejectionWarning: TypeError: Cannot create property 'cardName' on string 'admin#borrow-network' at cardStore.get.then(...././lib/businessnetworkconnection.js)
Am I doing something wrong?
Please, any help is much appreciated.
1) you need Node 8.9.x or higher (eg, 8.11 etc - not node 9) 🙂 https://hyperledger.github.io/composer/installing/installing-prereqs.html suggest to uninstall old composer modules, get your node version up to speed using nvm then switch to that node version (8.9.x) and install composer modules (then the 'gyp' pre-compile issue gets resolved) etc as per https://hyperledger.github.io/composer/installing/development-tools
2) Don't use sudo or root privileges to install Composer (npm) modules - (you know that, just saying) - for npm errors / permission denied if you have such issues - suggest to follow the best practices here https://docs.npmjs.com/getting-started/fixing-npm-permissions including recommendation to install a Node Version Manager (install NVM then use that to manage Node installs) - more info here -> https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#information_source--composer-installation-issues (items 1, 2)

How to integrate other ember app to existing project?

I am working on ember cli version 1.12 and node js version v0.12.7,I want to intergrate ember-cli-barcode addon.I have tried following:
ember install:npm ember-cli-barcode
Then it will show message that it required node version 4 >.So I have used Node version v7.0.0 stable.I installed node modules and addon.
Then tried following command:
npm install
bower install
ember server
But It will always shows errors,of node-modules etc.Kindly help me for the same how to integrate addon and which file need to change.
This should be a comment but I can't comment yet. I'm the author and it's compatible with Ember 2.4 onward. I will be putting version compatibility information in the readme.
I haven't worked with a cli version this old but ember install should be all you need if it's compatible. The add-on is a really thin wrapper around JsBarcode, so you could use the library direct if you have stay with the current ember version.
To get the benefits of the full ember-cli ecosystem, you'd have to be using the versions that support it. I think that it began in 1.13
As mentioned, it's highly likely that this addon assumes the standard CLI setup. You could ask the author.
Depending on your app complexity, you could do a few different things.
You could use the js library https://github.com/lindell/JsBarcode - (which is what the addon uses)
OR you may want to rewrite the app with the latest and greatest - now. 1.12 is going to be expensive to keep up / and since you've likely figured out how all the logic should work, then writing it again won't be the hardest part. (this sounds fun, right?) - and then use the addon
Which will take longer?

How do you use tfs-cli in a disabled network environment?

Our TFS build server does not have access to the internet. After getting node.js installed next I tried to install tfx-cli. using the command:
npm install -g tfx-cli
As far as I can tell, now it wants to download dependencies required. It looks like a whole web of dependencies - nuget style. Am I expected to set up an internal npm server with the dozens of dependencies required, becoming an expert on node.js and npm - just so I can add some custom commands to our TFS server?
Is there a version of tfs-cli I can get that includes all dependencies ?
I know this is old, but I just happened to come across your question. Hopefully this will help others.
Although I haven't tried it myself, there do seem to be ways of installing NPM packages offline. Here's one Stack Overflow answer that may get you pointed in the right direction. Another solution I've seen recommended is npmbox.

Resources