Skip to content
This repository has been archived by the owner on Jun 2, 2021. It is now read-only.

Not working on Modulus with Meteor 1.2.x #10

Closed
cdcv opened this issue Oct 12, 2015 · 23 comments
Closed

Not working on Modulus with Meteor 1.2.x #10

cdcv opened this issue Oct 12, 2015 · 23 comments

Comments

@cdcv
Copy link

cdcv commented Oct 12, 2015

After update to 1.2, must remove this package for app to work.
Do you have a sense of when you might be able to resolve this? This is mission-critical for us.

Thank you for your help, and your helpful package.

@aaronjudd
Copy link
Contributor

Interesting, we're using this with Meteor 1.2 on the reactioncommerce.com site, without issue. Are there any output error logs that you can provide to help debug?

@cdcv
Copy link
Author

cdcv commented Oct 12, 2015

When I run the code locally, I don't get any errors, but the functionality to pull from a spreadsheet doesn't work.
When I deploy to Modulus, I get the errors:
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/1to2
npm ERR! 404
npm ERR! 404 '1to2' is not in the npm registry.

I searched for 1to2 and couldn't find anything about it.
I ran npm locally and did a build locally. This allowed me to find the 1to2.js file, which upon build ends up within the meteor-google-spreadsheets package.
It's buried so many folders deep that it'd be hard to indicate where. If you need me to, I can give you the full path, but I'd have to hand type a 20-deep subdirectory... I presume that if you search you can find it on your own machine more easily.

Thanks for your help with this.

@aaronjudd
Copy link
Contributor

Was just discussing with @aldeed -> I'm able to use locally, the npm packages look to be up to date, and I've successfully deployed with meteor deploy as well as within a Docker image, all on Meteor 1.2 (and all previous versions). I didn't see 1to2 in the immediate dependencies list, but you're probably right that it's buried deep in there - however I don't get a 404 just going to that registry url, although it's an empty object so maybe npm is interpreting it as a 404.

@cdcv
Copy link
Author

cdcv commented Oct 12, 2015

Unfortunately, this is out of my experience depth. Do you know what we can do to resolve this? Thanks.

@aaronjudd
Copy link
Contributor

Without a way to replicate on my end, it might be tough. I'll take a look later and see if build and publishing an updated Meteor 1.2 package helps. It might be that the a fresh build eliminates the 1to2 dependency. You could also clone this package into your packages folder and see if anything new shows up when you have the actual package local as well.

@cdcv
Copy link
Author

cdcv commented Oct 12, 2015

Here is the location of the 1to2.js file:
bundle/programs/server/npm/ongoworks_google-spreadsheets/node_modules/edit-google-spreadsheet/node_modules/xml2json/node_modules/node-expat/node_modules/iconv/node_modules/nan/tools

On my machine it isn't empty. I can paste the contents if that's helpful.

@cdcv
Copy link
Author

cdcv commented Oct 12, 2015

Here is the readme from the folder:
1to2 naively converts source code files from NAN 1 to NAN 2. There will be erroneous conversions,
false positives and missed opportunities. The input files are rewritten in place. Make sure that
you have backups. You will have to manually review the changes afterwards and do some touchups.

$ tools/1to2.js

  Usage: 1to2 [options] <file ...>

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

@aaronjudd
Copy link
Contributor

Can you retry using ongoworks:google-spreadsheets@0.4.2_3?

@cdcv
Copy link
Author

cdcv commented Oct 15, 2015

Thanks for your help. Unfortunately, on deploy to Modulus, I'm still getting the error:
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/1to2
npm ERR! 404
npm ERR! 404 '1to2' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'BrainfulApp'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

@aaronjudd
Copy link
Contributor

With a build version, the only instances of 1to2 are found in:

bundle/programs/server/npm/ongoworks_google-spreadsheets/node_modules/edit-google-spreadsheet/node_modules/xml2json/node_modules/node-expat/node_modules/iconv/node_modules/nan/tools/package.json
bundle/programs/server/npm/ongoworks_google-spreadsheets/node_modules/edit-google-spreadsheet/node_modules/xml2json/node_modules/node-expat/node_modules/iconv/node_modules/nan/tools/README.md
bundle/programs/server/packages/momentjs_moment.js
bundle/programs/server/packages/momentjs_moment.js.map
bundle/programs/web.browser/packages/momentjs_moment.js
bundle/programs/web.browser/packages/momentjs_moment.js.map

The issue could be related to this: nodejs/nan#441

What version of node are you deploying with? And what OS version? Those could matter here.

@cdcv
Copy link
Author

cdcv commented Oct 15, 2015

Thanks again very much for your help -- makes a big difference to us here.
On modulus, it appears that it is using the following:

Deploying project into Node.js runtime...
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Package found: /package.json
Installing node 0.10.40
Installing npm 3.3.6
Installing packages from /package.json

Locally, I'm running on OSX 10.11 (El Capitan).
Is this what you were asking?

@aaronjudd
Copy link
Contributor

The OS you are deploying to... I'm wondering because iconv (which is using nan) is a package I've had issues with getting to compile cross platform (node-gyp errors usually). This was the package that was causing our windows builds to fail earlier.

@aaronjudd
Copy link
Contributor

Also, are you sure your app is using ongoworks:google-spreadsheets@0.4.2_3? You may need to be explicit in .meteor/packages.

@cdcv
Copy link
Author

cdcv commented Oct 15, 2015

Yes, verified, here is the line from our .meteor/packages:
ongoworks:google-spreadsheets@0.4.2_3

Here is the info from Modulus when we build.
So linux-x64-v8-3.14 seems to be indicated I think??

meteor bundle generation complete.
Finding dependencies...
234 dependencies found.
Creating package.json file.
package.json file generation complete.
Deleting node_modules folders.
Compressing project...
40.7 MB written
Uploading project...
Upload progress [===================] 100%
Deploying project into Node.js runtime...
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Package found: /package.json
Installing node 0.10.40
Installing npm 3.3.6
Installing packages from /package.json
npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select'
npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what'

bcrypt@0.7.8 install /mnt/input/node_modules/bcrypt
node-gyp rebuild

make: Entering directory /mnt/input/node_modules/bcrypt/build' CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node COPY Release/bcrypt_lib.node make: Leaving directory/mnt/input/node_modules/bcrypt/build'

fibers@1.0.5 install /mnt/input/node_modules/fibers
node ./build.js

linux-x64-v8-3.14 exists; testing
Binary is fine; exiting

@aaronjudd aaronjudd changed the title No longer working after Meteor 1.2 upgrade No working on Modulus with Meteor 1.2.x Oct 15, 2015
@aaronjudd aaronjudd changed the title No working on Modulus with Meteor 1.2.x Not working on Modulus with Meteor 1.2.x Oct 15, 2015
@cdcv
Copy link
Author

cdcv commented Oct 15, 2015

Actually, things don't seem to be working locally either. In the local case, the app will build without incident. However, when we try to pull data from a google spreadsheet, we get the following console:

errorClass {error: 400, reason: "Match failed", details: undefined, message: "Match failed [400]", errorType: "Meteor.Error"}

If the app is reverted back to the pre-1.2 code (which doesn't have changes relating to the spreadsheet functionality) then the same function works correctly.

Thanks again for your help in resolving this -- much appreciated. We're currently having to hand transfer data...

@aaronjudd
Copy link
Contributor

I'm really not sure I can debug much further without your source, as I can't replicate in any way - and we're using this right now without issues ( https://reactioncommerce.com/features is driven by this), and I know of several other packages that are also working with this version right now.

Neither of the errors you reported really directly point to an error with this package either, so their not too helpful. Perhaps something else, such as the spreadsheet itself has changed - the Match failed error (I need the entire error not just that tidbit to really know) would be an indication that a meteor method is being called without the required parameters. This could be caused by something on the spreadsheet side.

I'm leaning towards it being some other code change, or spreadsheet change - maybe some data in the spreadsheet that is the root cause.

@cdcv
Copy link
Author

cdcv commented Oct 15, 2015

I don't think it's the data in the spreadsheet, since I can pull the same spreadsheet successfully (either locally on or modulus) using the code from just prior to the 1.2 update.
Thanks for your help.
Not sure how to proceed.
Is it possible for the package to remove the dependency that calls in the offending js file?

@cdcv
Copy link
Author

cdcv commented Oct 15, 2015

Is there some other relevant test that I can perform on my end? One idea that comes to mind is to downgrade from 1.2 and see if this fixes the error. However, I'm kind of jumping into the dark hoping to catch a branch...

@aaronjudd
Copy link
Contributor

No, the dependencies cannot be removed.

Not really jumping in the dark :-)

You just need to use 'meteor --release' and any previous Meteor version to test this. (type meteor --help for details)

@aaronjudd
Copy link
Contributor

Of course, if the problem is in your code, you'd be better off reverting any changes you made (such as .meteor/versions .meteor/releases) in your repo for a better test.

@aldeed
Copy link
Contributor

aldeed commented Oct 18, 2015

@aaronjudd I figured out where the Match errors come from. PR here: #11

If you can merge and release this, hopefully that will fix @cdcv's issue at least running locally.

@cdcv
Copy link
Author

cdcv commented Oct 18, 2015

Thanks Eric.
Great! Hope this resolves that issue.

@aaronjudd
Copy link
Contributor

Published ongoworks:google-spreadsheets@0.4.2_4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants