There isn't a clear guide on how to install Phantom for Meteor, so I decided to ask a question to clarify things.
Do you have to install phantom binary in /usr/local/bin/? I downloaded a compiled phantomjs from the official website and placed inside the above path. I can run phantomjs from anywhere now because it's added to path.
In addition to 1, do you also have to install it from meteor npm? I followed this to install "phantomjs": "1.9.13" as a npm package inside my Meteor app. It gets confusing from here because the binary from the official website is v2.0.0 while the npm package is 1.9.13. Do I need to install both?
Because of the confusion in 2, I removed /usr/local/bin/phantomjs but then I can't run $phantomjs anywhere because I don't have anything in PATH.
My ultimate goal is to get spiderable working. What should I do?
Okay, the problem was the compiled phantomjs binary from the official webpage cannot be used right away in the latest Mac OS, but you have to unpack it first. To run spiderable package you don't need to do anything other than placing the binary file phantomjs inside your local path /usr/bin/local/. You can test this by running $phantomjs in your terminal. If you see phantomjs not found then you haven't installed it. If you see an error killed 9 then you have the same problem as mine, and you can solve it by following this.
You do not need the meteorhacks:npm package.
You can do this in two ways:
Method 1:
If you'd like to be able to use PhantomJS via your Meteor app, you would need to use the Meteorhacks NPM package and use the latest NPM version 1.9.16 I believe.
After that, you can edit your packages.json file to add "phantomjs": "1.9.16", and then reference it via var phantomjs = Meteor.npmRequire('phantomjs');
Method 2:
Alternatively, you can use the smart package for Meteor PhantomJS and give that a shot.
I personally feel like Method 1 is a better option, as that worked for me. I needed PhantomJS for an app, and that solution worked for me. I haven't tried Method 2 so I can't speak for it, but it looks promising as well.
Give them a shot, and let me know how it goes. Hope that helps!
Here is a phantomjs wrapper package from atmosphere: https://atmospherejs.com/gadicohen/phantomjs
More importantly here is the spiderable package:
https://atmospherejs.com/meteor/spiderable
I couldn't really answer the questions but more so point ya in a direction that I hope will solve your problem :)
In the terminal:
$ meteor npm install --save phantomjs
In your_meteor_app/server/main.js file (or wherever, provided it's server-side)
import phantom from 'phantom'
Just use npm:
//Global effect on your machine
npm install -g phantomjs
//Test if installed
npm list -g
//Test spiderable working correctly
Test spiderable
Related
i am learning tailwind css and in tutorial they write a command like this npx tailwindcss-cli build css/tailwind.css -o build/tailwind.css
and it build a different folder name "tailwind.css" in same directory
but in my case it gives a error
No valid exports main found for 'C:\Users\HHH\AppData\Roaming\npm-cache\_npx\4952\node_modules\tailwindcss-cli\node_modules\postcss'
I don't have any idea what it means and whats wrong with the setup.
please help.
I find the solution.
Just install the current node.js and reinstall the specific version.
download here
After that install it and everything works fine.
Note: It works in when you follow the tailwindcss cli method.
follow first part of video
I'm trying to add WordPress Coding Standards to ESLint in Atom. Unfortunately there are no package I could add via Atom's installer. I've found one (I think) suitable package here but whenever I try to install it using Windows CMD or XAMPP shell I get "npm is ot recognized as internal or external command". I installed ESLint for Atom, so I've got the prerequisite met. Is it possible to add it to Atom on Windows at all?
Cheers, best regards.
Ok,
I digged into the topic and pparently I didn't have Node.js installed so I couldn't manage any npm packages. After installing Node.js I was able to install WordPress-Coding-Standards. Unfortunately I installed the wrong package at first, which was eslint-plugin-wordpress. After trying to set it up eslint started giving me plenty of errors. Then I found out (with a little help from guys on Github) that there are other WordPress Coding Standards plugin for eslint - eslint-config-wordpress which I installed as well. Now everything works like a charm. It's good to learn something new everyday.
Thanks, Dan.
EDIT
Now above packages are deprecated, use #wordpress/eslint-plugin
I was trying to get an example an working from this tutorial: http://g00glen00b.be/meteor-twitter-streaming/
Here's the Github url: https://github.com/g00glen00b/meteor-twitter-stream
It was written in Meteor 0.7 and it requires some packages so the instructions say to do this:
mrt add semantic-ui
mrt add npm
mrt add streams
mrt add momentjs
However, I have Meteor 0.9.4 and since 0.9 we're not supposed to use meteorite anymore, just add packages directly with the "meteor add #package#" command.
The problem is that none of the packages needed by this project can be found (npm, semantic-ui,streams,momentjs). I tried asking the original author of the code but he needs time to look into it.
So I thought I would ask the community. Any ideas?
Thanks for your help
During the package migration to 0.9, many packages were automatically migrated under the mrt user. Thus, meteor add mrt:<package> might work.
The best way to find the package you're looking for is to search for it on Atmoshpere, e.g. https://atmospherejs.com/?q=semantic, https://atmospherejs.com/?q=moment etc.
So your install instructions should become:
meteor add nooitaf:semantic-ui meteorhacks:npm arunoda:streams mrt:moment
Note that Arunoda is no longer maintaining streams, so you might want to look for an alternative.
locate the package here
or by typing:
meteor search semantic
meteor search moment etc...
more information regarding this matter: here
I'm trying to update to the version 0.6.2, but when I insert mrt update iron-router in the command line I receive this alert:
Problem installing iron-router
✘ [0.6.1] conflicts with [0.6.2]
Can't resolve dependencies! Use --force if you don't mind mrt taking a wild guess and running your app anyway.
Am I doing something wrong?
Thanks in advance.
You could try a fresh installation:
meteor remove iron-router
rm -rf packages/iron-router
mrt update
meteor add iron-router
Also make sure you're using the latest version of meteorite
sudo -H npm install meteorite
It seems that one of the other smart packages you are using explicitly depends on a different version of Iron Router. Based on the smart.json packages that you posted, accounts-entry depends on 0.6.1 and I'm guessing you are manually depending on iron router 0.6.2 in your main app.
The best course of action is to probably change the version in accounts-entry (it will probably not break anything, as 0.6.1 to 0.6.2 was just bug fixes) and possibly submit a pull request for that as well.
Had a Similar problem.
Go to you app directory, open meteor, then open packages and you will see
iron-router
inside the file listed as a meteor package.
Then go to the terminal and
cd yourApp
meteor add iron:router
for me that added the 1x version and solved many of my errors.
Hope it works!
I am planning to release an app based on nodejs. Is there any dependencies that I need to add to my package other than the nodejs executable?
I already did some test on windows and it works with the executable only, but how about on unix systems?
Will it also work?
I'm sorry but I couldn't find this information on the official documentation.
EDIT : I realise I expressed myself wrong, I am sorry about that, so here is exactly what I wanna do :
//app.js
console.log("hello world");
//main.cpp
int main() {
system("pathtomynode/node.exe app.js");
return 0;
}
On windows, I create a simple.exe with main.cpp, and I put node.exe + app.js + main.exe in an msi and it works fine.
I want to do exactly the same on mac osx with a .pkg, but I want to know if the node binary will be enough, or does the node binary has any dependencies. I managed to do the test on windows beause node installs everything in one folder but I don't know how it goes on mac so that's what I'm asking.
Again I'm sorry about the confusion.
You have here a guide for install node.js on Ubuntu.
http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/
*nix comes in many different flavors and you won't be able to find an executable of node that will run everywhere.
This information is on the wiki page for 'Building and installing Node.js': https://github.com/joyent/node/wiki/Installation
If your package has dependencies on other modules, then you will need to install those using npm (unless your package is also published to npm, in which case it is automatic when your package is npm installed).
Assuming you have your own dependencies and you have specified those dependencies in your package.json file, executing
$ npm install
...(from the folder that contains your module) will install any dependencies that you have specified.