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

Upgrade from 0.7.5 to 0.7.6 underscore error on Meteor start #80

Closed
RWizard opened this issue Oct 28, 2016 · 28 comments
Closed

Upgrade from 0.7.5 to 0.7.6 underscore error on Meteor start #80

RWizard opened this issue Oct 28, 2016 · 28 comments
Labels

Comments

@RWizard
Copy link

RWizard commented Oct 28, 2016

W20161028-20:07:33.458(3)? (STDERR) /Users/romanvasiliev/.meteor/packages/meteor-tool/.1.4.2.zi1w5b++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20161028-20:07:33.579(3)? (STDERR) throw(ex);
W20161028-20:07:33.580(3)? (STDERR) ^
W20161028-20:07:33.581(3)? (STDERR)
W20161028-20:07:33.581(3)? (STDERR) Error: Cannot find module 'underscore'
W20161028-20:07:33.581(3)? (STDERR) at Function.Module._resolveFilename (module.js:325:15)
W20161028-20:07:33.582(3)? (STDERR) at Function.Module._load (module.js:276:25)
W20161028-20:07:33.582(3)? (STDERR) at Module.require (module.js:353:17)
W20161028-20:07:33.583(3)? (STDERR) at require (internal/module.js:12:17)
W20161028-20:07:33.587(3)? (STDERR) at Object. (/Users/romanvasiliev/.meteor/packages/lookback_emails/.0.7.6.tez422++os+web.browser+web.cordova/npm/node_modules1/html-to-text/lib/html-to-text.js:4:9)
W20161028-20:07:33.588(3)? (STDERR) at Module._compile (module.js:409:26)
W20161028-20:07:33.588(3)? (STDERR) at Object.Module._extensions..js (module.js:416:10)
W20161028-20:07:33.589(3)? (STDERR) at Module.load (module.js:343:32)
W20161028-20:07:33.589(3)? (STDERR) at Function.Module._load (module.js:300:12)
W20161028-20:07:33.589(3)? (STDERR) at Module.require (module.js:353:17)
W20161028-20:07:33.590(3)? (STDERR) at require (internal/module.js:12:17)
=> Exited with code: 1

@johanbrook
Copy link
Contributor

Interesting. Comes from the html-to-text module. No idea what's causing it.

@RWizard
Copy link
Author

RWizard commented Oct 28, 2016

No problem, I revert to previous ver. Maybe idea come tomorrow . :)

@cmaddalozzo
Copy link

I'm seeing the same issue on Sierra with 0.7.6 version of lookback:emails. Downgrading to 0.7.5 fixes the problem.

@thebarty
Copy link
Contributor

@johanbrook : Yeah I am getting this, too - strangly ONLY, when NOT having the package locally withn /packages/meteor-emails.

Maybe a

Npm.depends({
  'html-to-text': '2.1.3',
  'underscore': '....'  // which minimal version?
});

will do the trick?

@bmustata
Copy link

Similar issue on here. Back to 0.7.5.

@amazingsam
Copy link

amazingsam commented Nov 2, 2016

Does also occur on El Capitan; this is not only a Sierra problem. Downgrading to 0.7.5 works.

@johanbrook johanbrook changed the title [OSX Sierra] Upgrade from 0.7.5 to 0.7.6 underscore error on Meteor start Upgrade from 0.7.5 to 0.7.6 underscore error on Meteor start Nov 2, 2016
@johanbrook johanbrook added the bug label Nov 2, 2016
@johanbrook
Copy link
Contributor

html-to-text clearly has a dependency on underscore (1.8.3): https://github.com/werk85/node-html-to-text/blob/master/package.json#L27. Don't know why it doesn't build it correctly.

@thebarty
Copy link
Contributor

thebarty commented Nov 4, 2016

yeah - really strange.

Can you reproduce this locally? If no: why not?

@thebarty
Copy link
Contributor

thebarty commented Nov 4, 2016

If we can NOT reproduce this locally (I can NOT), then maybe try something like this on the server?

@robinandersson
Copy link

I seem to be getting this issue on startup (locally) when on both 0.7.6 and 0.7.5, but downgrading to 0.7.4 solves it.

Just FYI, same error on both Meteor versions 1.3.1 and 1.4.2.

@johanbrook
Copy link
Contributor

Gotcha. Might not have been introduced in 0.7.6 then, but rather some (lingering) issue either with html-to-text or Meteor's build system (I highly suspect the latter, as I always do).

One fix would be to remove the hard dependency on html-to-text (https://github.com/lookback/meteor-emails/blob/master/package.js#L11-L13) and make it opt-in, like I did with chrisbutler:node-sass vs. npm node-sass. Investigating.

@thebarty
Copy link
Contributor

thebarty commented Nov 4, 2016

sorry for the confusion. what I meant is that I can NOT reproduce this when having the package itself for development forked under packages/meteor-emails. If I remove it then I also see this error

@zeroasterisk
Copy link

I am having this error, even after installing underscore explicitly.
I'll also be downgrading, for now.

@johanbrook
Copy link
Contributor

@darrenangle
Copy link

This is crashing a new meteor app at 0.7.6, 0.7.5, and 0.7.4. for me. Same error.

@daaaaan
Copy link

daaaaan commented Nov 21, 2016

[email protected]

Can confirm issue with package @=0.7.6

NO issues with package @=0.7.5 & @0.7.4.

Didn't poke around much as didn't seem much apart from dependencies had changed from some of the commits I looked at.

Seems to be a weird one. 😭

@johanbrook
Copy link
Contributor

Thanks @daaaaan and @darrenangle. Indeed a weird one .. No help from the forums either.

Would be kinda sad to be forced to make html-to-text an external peer dependency too.

@thebarty
Copy link
Contributor

Hi guys,

we need to find a solution for this. I just tried setting up a CI (via circle) and it throws the same error.

@johanbrook: If making "html-to-text" an external peer dependency is what it takes, give it a go and publish another release? It would be a pity if we couldn't use the new features available in the new versions of your package. If the meteor-build process works correct again (ever????) then you can always roll back? But this is the active thing we can do right now to make it work, I guess

@thebarty
Copy link
Contributor

OK, so there probably is a workaround (I can say for sure on CircleCi).

Like I wrote earlier, I am NOT getting this error, when I have the package installed locally under "/packages/meteor-emails".

CircleCi works with this extra line cd src/packages; git clone https://github.com/lookback/meteor-emails.git; ls -al;

So maybe a meteor build would also work, if you did a cd src/packages; git clone https://github.com/lookback/meteor-emails.git before

So this is an excerp of a circle.yml:

dependencies:
  pre:
    - if [ ! -e src/.meteor/meteor ]; then cd src; curl https://install.meteor.com | /bin/sh 2>&1 | cat; ls -al; fi
    # WORKAROUND for lookback_emails: right now "lookback_emails" is crashing with underscore problem 
    #  (see https://github.com/lookback/meteor-emails/issues/80),
    #  but it works if we fetch it to local disk
    - cd src/packages; git clone https://github.com/lookback/meteor-emails.git; ls -al;
    - cd src; meteor --version;

@grabcode
Copy link
Contributor

I am not sure how to test the following proposal to fix the issue, as it works when adding the package locally (under the /packages folder of a project).

A quick fix would be to update the Npm.depends, adding underscore to it:

Npm.depends({
  'html-to-text': '2.1.3',
  'underscore': '1.8.3'
});

@johanbrook
Copy link
Contributor

Ugly, but would get the job done. I can prepare a test release.

@grabcode
Copy link
Contributor

Hey @johanbrook, here is a PR #85

@johanbrook
Copy link
Contributor

Changes from #85 are merged to master, but still can reproduce error.

Tried wrapping html-to-text module in a Meteor package, to see if that can get around the build problems, but got

lookback:html-to-text: updating npm dependencies -- html-to-text...
/Users/Johan/.meteor/packages/meteor-tool/.1.4.2_3.1f1r9lq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/ddp/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^

Error: ENOENT: no such file or directory, rename '/Users/Johan/Projects/Code/lookback/lookback_html-to-text/.npm/package-new-1sm8u3a' -> '/Users/Johan/Projects/Code/lookback/lookback:html-to-text/.npm/package'

I'm so done with Meteor's various build problems now -.-

@johanbrook
Copy link
Contributor

johanbrook commented Nov 29, 2016

Fixed error, now getting

Error: Depending on unknown package lookback:html-to-text

when depending on the new Meteor package from within lookback:emails, even though the former exists: https://atmospherejs.com/lookback/html-to-text. Might be propagating.

@johanbrook
Copy link
Contributor

Fixed and published as 0.7.7. Give it a run ⚡️

@grabcode
Copy link
Contributor

grabcode commented Nov 29, 2016

It works. Just in case, I've wiped out all the versions of lookback:emails, stored under $HOME/.meteor/packages/lookback_emails, and reinstall it.

@RWizard
Copy link
Author

RWizard commented Nov 30, 2016

Thanks, upgrade to 0.7.7 FINE!

@RWizard RWizard closed this as completed Nov 30, 2016
@darrenangle
Copy link

🙏

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

No branches or pull requests