-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundling/preinstall woes #260
Comments
They are not unexplainable, they are a logical result of using npm/package.json in a way they are not designed to be used. You've already read my explanation: mapnik/node-mapnik#650 (comment) |
So as of npm3 I think we still have to bundle, I haven't checked in a
while. Also to support npm2 installs I've found I have to publish (and
reinstall node-modules) with npm2. With bundling and npm2 publishing I've
been able to have issue free installs on all platforms and node versions
(including 10 and 12) and I've gone as far as to test it.
https://github.com/johnny-five-io/serialport-test-pilot
I still think npm/npm#12583 is a bug however all
that means is we can't do that. Even if it's fixed we still should package
for the versions of npm that ship with the versions of node we support.
¯\_(ツ)_/¯
…On Sat, Jan 21, 2017, 10:04 PM Travis Webb ***@***.***> wrote:
may lead to unexplainable hangs with various npm versions:
They are not unexplainable, they are a logical result of intentionally
using npm/package.json in a way they are not designed to be used. You've
already read my explanation: mapnik/node-mapnik#650 (comment)
<mapnik/node-mapnik#650 (comment)>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#260 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABlbklPUCnPP321qSm1f-yIHzx_2ptGks5rUsdJgaJpZM4LOy6F>
.
|
Hey @reconbot! Thanks for visiting us in Norfolk yesterday.
This can be solved by setting Another issue here is some modules' reliance on the particular way npm2/npm3 structure the node_modules folder. Some of these issues can be avoided by being a little bit cute with the paths in binding.gyp, e.g. https://github.com/langateam/node-mapnik/blob/master/binding.gyp#L60-L61. This bullet point describes a slightly different issue, but it's in the same theme of path problems introduced by different npm versions. |
Thanks everyone for the feedback. I've reverted #201 by applying #269, which changes the documentation to recommend bundling. Because this is only a documentation change the work ahead then is to:
|
What's the best way to handle "anecdotes of failure"? I've just had the familiar
on another system but I presume that you don't want this issue clogged up with with each individual failure and stacktraces. Are there any particular bits of information that are useful to obtain? (for completeness, in case it invalidates this as relevant to this issue - this was with the LTS version of node as recommended at kosmtik/kosmtik#232 (comment) ). |
@SomeoneElseOSM kosmtik/kosmtik#232 is likely resolvable by downgrading to npm to 2.x or upgrading node-mapnik to 3.6.x. |
I always get |
This is expected/normal @pronebird - generally this is okay for modules coming via github, because (if I recall correctly), in this case npm will not dedupe. This lack of deduping avoids one of the problems that requires bundling in the case of an
|
Closing this. As long as you are running node > 4:
If anyone finds otherwise, please comment here. But node-sqlite3 has been released recently without any problems without using refs #403 |
This is an obsolete workaround for old npm versions that broke with bundling but also did not install deps predictably. Refs: - https://github.com/mapbox/node-pre-gyp/blob/master/README.md#configuring - mapbox/node-pre-gyp#260
This is an obsolete workaround for old npm versions that broke with bundling but also did not install deps predictably. Refs: - https://github.com/mapbox/node-pre-gyp/blob/master/README.md#configuring - mapbox/node-pre-gyp#260
Bundling node-pre-gyp was only needed for node v4 and earlier. Remove it to avoid errors like: > npm ERR! enoent ENOENT: no such file or directory, rename '/home/circleci/project/node_modules/node_or_tools/node_modules/abbrev' -> '/home/circleci/project/node_modules/node_or_tools/node_modules/.abbrev.DELETE' More context: mapbox/node-pre-gyp#260 (comment)
Bundling node-pre-gyp was only needed for node v4 and earlier. Remove it to avoid errors like: > npm ERR! enoent ENOENT: no such file or directory, rename '/home/circleci/project/node_modules/node_or_tools/node_modules/abbrev' -> '/home/circleci/project/node_modules/node_or_tools/node_modules/.abbrev.DELETE' More context: mapbox/node-pre-gyp#260 (comment)
Ticket to keep track of edge cases around applications bundling node-pre-gyp (which was the original recommendation but alternatives were proposed in #162) and not bundling (which was documented as an option in #201).
npm install node-pre-gyp
in"preinstall"
: may lead tounexplainablehangs with various npm versions: Infinite loop during preisntall on node 0.12.7 npm 3.8.8 npm/npm#12583 | rebundlenode-pre-gyp
and do not preinstall it mapnik/node-mapnik#658npm install node-pre-gyp
in"preinstall"
:preinstall
fails withenoent ENOENT: no such file or directory, open '/home/user/<package>/package.json'
- refs Installation issues with node v4.2.6, npm v3.5.2 Project-OSRM/node-osrm#305More details: fsevents/fsevents#157 (comment)
The text was updated successfully, but these errors were encountered: