total 24K
drwxrwxr-x 6 jimmy jimmy 4.0K Apr 13 16:39 .
drwxrwxr-x 14 jimmy jimmy 4.0K Apr 14 17:14 …
drwxrwxr-x 6 jimmy jimmy 4.0K Jul 16 2015 accounts-entry
drwxrwxr-x 3 jimmy jimmy 4.0K Jul 16 2015 meteor-jasmine
drwxrwxr-x 8 jimmy jimmy 4.0K Jul 16 2015 meteor-jasmine-obs
drwxrwxr-x 2 jimmy jimmy 4.0K Jul 16 2015 tests-proxy
I’m not totally certain why the error in the previous post is in parsers/casper.js. The line of code is in a file called
server/parsers/photo_tag.js, and the file looks like this:
Meteor.methods({
photo_tag:function(source_id, parameter, project_id){
var source_type = 'photo_tag';
import casperjs from 'casperjs';
var scrape_id = parser.logging.start(source_id, source_type, parameter);
console.log('PHOTO TAG CALLED: ', parameter);
});
Causing the error
app/server/parsers/photo_tag.js:7
W20160415-11:20:43.514(1)? (STDERR) import casperjs from ‘casperjs’;
While CasperJS is installable via npm, it is not a NodeJS module and will not work with NodeJS out of the box. You cannot load casper by using require(‘casperjs’) in node. Note that CasperJS is not capable of using a vast majority of NodeJS modules out there. Experiment and use your best judgement.
# Meteor packages used by this project, one per line.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
less
accounts-ui
accounts-password
momentjs:moment
aldeed:autoform
cunneen:mailgun
aldeed:collection2
mrt:flash-messages
d3
mrt:googlemaps
mizzao:autocomplete
aldeed:geocoder
matteodem:easy-search
iron:router
random
reactive-var
reactive-dict
twbs:bootstrap
meteorhacks:async
ostrio:neo4jdriver
zimme:iron-router-active
percolate:synced-cron
rzymek:randomcolor
http
tsega:bootstrap3-datetimepicker
useraccounts:bootstrap
d3js:d3
erasaur:meteor-lodash
alanning:roles
meteor-base
mobile-experience
mongo
blaze-html-templates
session
jquery
tracker
logging
reload
ejson
spacebars
check
standard-minifier-css
standard-minifier-js
aldeed:tabular
krstffr:instagram-fetcher
OK, so now I’m trying to use PhantomJS directly, and I sill have the same problem. I’ve done
meteor npm install --save phantomjs-wrapper
and I see
W20160415-14:17:30.542(1)? (STDERR) app/server/parsers/photo_tag.js:1
W20160415-14:17:30.542(1)? (STDERR) (function(Npm,Assets){(function(){import phantomjs-wrapper from 'phantomjs-wra
import phantomjs-wrapper from 'phantomjs-wrapper';
Is the very first thing in my method file. It seems that I have Meteor 1.3, but that it doesn’t support modules?
This looks to me as that import statement is not at the very beginning of the file. It’s still in a function. Unless the Babel compiler is wrecking the thing. Not sure…
DONE 2 running registerCompiler callback in package templating took 1
DONE 1 determining active plugins took 2151
START 1 determining active plugins
DONE 1 determining active plugins took 0
START 1 building for web.browser |
START 2 linking the program |
DONE 2 linking the program took 50 |
START 2 loading plugin compileCoffeescript from package coffeescript
DONE 2 loading plugin compileCoffeescript from package coffeescript took 591
START 2 running registerCompiler callback in package coffeescript
DONE 2 running registerCompiler callback in package coffeescript took 1
START 2 processing files with ecmascript (for target web.browser)
The fact it goes quiet at the ecmascript phase seems to suggest that there are a lot of files (or big files) that it’s working through. Is it possible you have some something(s) in your project folders that shouldn’t be there?
Thanks for all your help with this. Noticed that a folder in node_modules was 18 meg (tldjs). Reinstalled it and it came out at 188k. Now it all runs fine.