UPDATE:
I'm using atmosphere npm package to work with node modules
I'm using this package to connect with github-api
https://github.com/mikedeboer/node-github
This package doesn't have method to get statistics of a user
There is a one pull request, In which he implemented that method
https://github.com/mikedeboer/node-github/pull/131
I made those changes in /packages/npm/.npm/package/github and restarted the server and error showing that
object has no method getStatsContributors
You can see the code I've added in that pull request
What I'm doing wrong?
you should add npm package to your meteor app
mrt add npm
And after that look at that : Meteor.require
Related
I have just tried to view an old application of mine using npm start but it wont load keep getting the error.
Cannot find module 'C:\Users\Team Knowhow\development\Punk-API\node_modules\react-scripts\bin\react-scripts.js.
I tried creating a new react app and NPM start works fine so have no idea what the issue is with my old react app and why NPM start does not work.
Have you installed dependencies first using npm install.
If done already, try removing node_modules folder and installing dependencies again.
Make sure you have installed all dependencies including react-scripts!
You've to ensure that all the dependencies that your application is using is mentioned in the correct manner with their correct version in your pacakage.json file. And if that looks alright then run
npm i
or
npm install
This command will download all the dependencies that are mentioned in your package.json file.
I am using the following book to build a MERN stack CRUD application. I'm having trouble installing and running graphql.
https://www.amazon.com/Pro-MERN-Stack-Development-Express-dp-1484243900/dp/1484243900/ref=mt_paperback?_encoding=UTF8&me=&qid= (published in 2019).
When I try to start the server contained in this repo https://github.com/vasansr/pro-mern-stack-2/tree/05.02-graphql-schema-file with the command npm start the app crashes and it returns an
Error: Cannot find module 'graphql/validation/rules/PossibleTypeExtensions'
I then followed some advice from a previous instance of this question on here to npm install karma-sinon-chai for the dependancies. But then I get the following error:
npm WARN apollo-graphql#0.4.4 requires a peer of graphql#^14.2.1 but none is installed. You must install peer dependencies yourself.
For me simply running npm install -g graphql fixed the problem (I had already installed Apollo globally with npm install -g apollo).
As per the error message apollo-graphql required a module from the graphql library validation/rules/PossibleTypeExtentions. The version of graphql I was using, as found by looking in my package.json, was "graphql":"^0.13.2".
I first tried to change this by changing my package.json to "^14.3.1". But after trying to install and run graphql I got the same error messages and when I looked in my package.json it had reverted back to "^0.13.2".
This may have been caused by my package.lock, locking me into that version. I then deleted package.lock, and node_modules folder.
I then ran the command nom install --save graphql#14.3.1, this worked fine.
I then just had to reinstall babel and Apollo-server-express and after this everything worked fine.
I am trying to use the twilio node.js library with my meteor application. I was able to install the package using meteor npm install --save twilio
and it installed correctly. However, when I use import twilio from 'twilio'; I get this error
Error: Cannot find module 'crypto'(…)require # modules-runtime.js?hash=637cb12…:119meteorInstall.node_modules.twilio.lib.webhooks.js # modules.js?hash=9468cd4…:38774fileEvaluate # modules-runtime.js?hash=637cb12…:191require # modules-runtime.js?
Any thoughts on how to fix this. Seems to be a meteor error.
Normally, when you hit the command meteor npm install it should create a folder name meteor-node-stubs (/node_modules/meteor-node-stubs) in which the dependencies such as crypto etc. is arranged.
I think there is a problem with this folder in your project. My suggestion is to check whether you have this folder.
If you do not have it, you can try to install it by meteor npm install --save meteor-node-stubs That should solve your problem if this is the case
I'm totally new to Node.js meteor and all development outside of visual studio.
When I go in the console and add bootstrap like this :
npm install twitter-bootstrap
It gets installed and adds all the bootstrap files in my solution but when I run my application with meteor it says
Process finished with exit code 254
No more information. No errors. If I delete all the bootstrap files, it builds and run just fine. Any idea what might be causing this?
I've tried looking for the exit code meaning but I can't find it for my IDE and I'm a bit clueless as for why simply adding those packages without even referencing them anywhere in the project might cause my application not to run at all.
You can't add npm packages in your project folder like that. It will create a node_modules sub-directory that meteor will treat like any other project folder, i.e., it will interpret all the files in it. That's not what you want. Either do the npm install in a super-directory, or, better yet, use the meteor meteorhacks:npm package (https://atmospherejs.com/meteorhacks/npm):
meteor add meteorhacks:npm
and then add the npm dependency to your packages.json file.
{
"twitter-bootstrap": "2.1.1"
}
But the real question is: why do you need this package? bootstrap3 is already part of the standard meteor packages, i.e., you already have full access to bootstrap, incl. javascript.
You can use atmosphere meteor packages called mizzao:bootstrap-3 by running the commend
meteor add mizzoa:bootstrap-3
Alternatively if you want to use npm packages you must add meteorhacks:npm packages.
meteor add meteorhacks:npm
npm install twitter-bootstrap
You can specify all the required npm packages inside a packages.json file.
{
"gm":"1.16.0",
"twitter":"0.2.12",
"twitter-bootstrap":"2.1.1",
}
I am trying to run a pre developed example in node.js environment. But i keep on getting the following error:
Cannot find module '/build/default/validation'
Am I missing some module installation from npm here...? I have installed all the other modules like socket-io, websocket, websocket-server, websocket-clien, etc.
-Parag
Check the package.json file for all required modules. Run npm install and npm update to automatically install all required modules and update them.
Usually, npm modules are in a folder *node_modules*, so /build/default/... looks like some custom module that should be shipped with the example.