I am getting the following error while running the fabcar sample hyperledger fabric example:
Error: Cannot find module 'fabric-network'
I have deleted my node_modules directory and afterwards ran an npm install to get all my project dependencies.
Any ideas on what else to try? Any help would be greatly appreciated!
Perhaps fabric-network isn't listed as a dependency within your package.json file so this dependency isn't installed within your node_modules directory when you ran an npm install. Maybe you could do the following:
npm i --save fabric-network
This will install the fabric-network module within your node_modules directory as well as update your package.json file to list this module as a dependency for your project.
Hopefully that helps!
Related
I have an existing Vue project and I want to add Boostrap into it. I ran this command (following this tutorial)
npm install bootstrap jquery popper.js
And then, I got an error in the Vue project.
./node_modules/core-js/modules/es.array.iterator.js module build failed: error: enoent: no such file or directory
I have tried deleting node_modules folder and package-lock.json then running npm install, but it didn't work. I also have tried to clear cache but it didn't work. I also have tried running npm install from my cmd but it didn't work as well.
Any other suggestions? Thanks!
Which version of vue are you using (2, 3)? Have you considered using Bootstrap Vue?
I just did the same method a few hours later and it succeeded. I think probably it also depends on your Internet connection.
I am trying to run npm install for a cloned project and it errors out with this error: Could not install from "node_modules/#miksu/prettier/parse-srcset#github:ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee" as it does not contain a package.json file
I don't have /node_modules in this directory since this is the first npm i for this project on my local computer. Also I am using vscode and I have this in the package.lock file #miksu/prettier but i don't have prettier in the package.json as a package to install. Let me know what other information is needed. Thanks!
Edit: I deleted the #miksu/prettier entry from package-lock.json and that allowed npm i to run successfully, but I'm still not sure what is going on with this error. Any clarity is appreciated, thanks.
I mean... the package it self doesnt contain a package.json
I want to add newsletter functionality with mailchimp, So I have installed mailchimp node module, but when I run my function, It gives me this error
Module 'mailchimp-api-v3' is not listed as dependency in package.json can anyone please help me why I am getting this error?
You must install it from the directory where your package.json is:
npm install mailchimp --save
With the --save option, the command will update your package.json file for you with the new dependency.
I created a local module using npm pack, which created a package: "org-header-0.0.3.tgz"
In a React project, I added org-header to its package.json:
"dependencies": {
"org-header": "file:[path-to-org-header]/org-header-0.0.3.tgz",
...
}
It installs fine. However, when I try to use it:
import Header from 'org-header';
...
However when I do npm run start:
Failed to compile.
./src/components/Layout.js
Module not found: Can't resolve 'org-header' in '/Users/imyjimmy/***/src/components'
Could it be because:
I did not structure the org-header project correctly
Webpack is doing something weird
Both?
I also encounter the same issue the other day. Just post my solution here if it helps.
So I'm testing a local dependency (project B) update in my main project (project A) through
npm pack --> generate the tgz file
refer the tgz file in the project A's package.json as above question shows
run npm install in project A to unpack the package -- installation works fine
run into below error when npm develop
Generating development JavaScript bundle failed
Can't resolve 'project B' in '/Users/xxx#xxx.com/projectA/src/pages'
What this error indicates is that the package Project A does not exist.
This is weird because when I ran npm list project B I actually got the confirmation that it exists.
The solution is to explicitly install project B again e.g.npm install project B , instead of running npm install after you change the package.json in step 3.
I don't know if it's webpack got confused by the 2 packages or somewhat, but the solution solved my problem .
I am working on Hyperledger fabric project and while running command node generateFights.js i am receiving the below error.
Error: Connection is not in the READY state at ChannelEventHub._checkConnection
I downloaded the source from HyperLedger Fabric API to my local directory.
I open the directory in VisualStudio and run the command, but it throws me an error.
Just to be sure: -
1. Docker Process is working. (Docker ps)
2. I have composer version installed ( v.0.19.0)
3. Node version - 8.11.1
What I tried to solve the issue: -
I begin the ./startFabric.sh
I installed the new network and started the process.
Imported the newly generated card.
Please suggest me what i need to do or learn to solve this issue.
The error "Connection is not in a READY state" has been seen a few times as a result of an underlying grpc problem. grpc v1.11.0 causes Composer to fail with this error, but v10.0.1 seems to be OK. More details are described and workarounds are described in this github issue.
It is likely that your app requires or has a dependency on a Composer client version with the grpc problem. If you remove your Node modules folder and examine your package.json file you should be able to fix the version problem
This issue has been addressed in the 1.1.2 release of the hyperledger fabric node sdk so you should ensure that your package.json dependencies will download this version and also ensure you clean up your node_modules directory and re-install your dependencies using npm install.
For Hyperledger composer users, v0.19.4 and beyond addresses this problem.
Go to directory in which composer-rest-server and composer-cli npm modules are installed, then install the grpc npm module with version 1.10.1.
Run the below command from both directories:
npm install --save grpc#1.10.1
It will solve your problem.
NOTE: In my case, node modules were installed at
/home/user_name/.npm-global/lib/node_modules/. That is my global directory for npm.