#31315 closed defect (fixed)
npm: ENOENT, No such file or directory 'ronn.js'
Reported by: | matt@… | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.3 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), tristan.klocke@… | |
Port: | npm |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Logfile: https://gist.github.com/e9115a90e6a194ecd3de
I got on the node.js IRC channel and talked to the creator of node. He didn't catch I was installing with MacPorts at first, but he checked out the log I linked above and made a couple comments about how you're building npm. He said he's not experienced with MacPorts and wasn't sure if these things were the way things work with it. Anyway, his additional feedback:
:debug:patch Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_npm/npm/work/npm-1.0.30" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/npm/files/patch-scripts-doc-build.sh' ^
He asked why you need to patch it for a Mac when it's developed on a Mac.
Also "...why they're running make docs
when the docs are already up to date in the release package. (or, if they're not getting the release package from registry.npmjs.org, why not?)"
And last: "anyway, looks like macports is pulilng the git repo, not the released tarball. the docs aren't built, so it's failing to build them. also unclear as to why it's running "make" rather than "make install" but maybe they do that in a second step or something"
Thanks!
Change History (23)
comment:1 Changed 13 years ago by matt@…
comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to ciserlohn@… |
Priority: | High → Normal |
comment:3 follow-up: 23 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Summary: | npm build fails on MacPorts → npm: ENOENT, No such file or directory 'ronn.js' |
Replying to matt@…:
Interesting, maybe the fix I attached to #31306 would fix this as well.
He asked why you need to patch it for a Mac when it's developed on a Mac.
You and he are welcome to examine the patchfile to see what we're doing:
trunk/dports/devel/npm/files/patch-scripts-doc-build.sh?rev=84119
As you see we're only patching the line that determines the version of npm. The original source runs "npm -v
" to do that; that can't possibly work in the context of an in-progress MacPorts build since npm won't have been installed in its final location by that time and so won't be in PATH yet.
Also "...why they're running
make docs
when the docs are already up to date in the release package. (or, if they're not getting the release package from registry.npmjs.org, why not?)"And last: "anyway, looks like macports is pulilng the git repo, not the released tarball. the docs aren't built,
Right. We're not building from the release package, we're pulling from the git repo. (I don't know why; I'll let Christoph address that.) Because we're pulling from git, the docs aren't there, so we need to build them. And that's what we're doing.
so it's failing to build them.
Why it's failing to build for you is as yet unclear. It builds fine for me, on Snow Leopard with Xcode 3.2.6 and on Leopard with Xcode 3.1.4.
also unclear as to why it's running "make" rather than "make install" but maybe they do that in a second step or something"
Yes, that's exactly how MacPorts works. The build phase runs "make". The subsequent destroot phase (which you didn't get to with npm because the build phase failed) would run "make install" (for most ports; the npm port in fact overrides this usual destroot and writes its own; again I don't know why "make install" was not sufficient.)
comment:4 Changed 13 years ago by matt@…
I ran into this problem on Lion 10.7.1 with Xcode 4.1.1 from the App Store.
Additionally, had it fail on my work computer: Snow Leopard 10.6.8, Xcode 3.2.6. Logfile: https://gist.github.com/e072c87b6337737e8f3a
comment:5 follow-ups: 6 7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
And does the patch in #31306 solve the problem?
comment:6 Changed 13 years ago by matt@…
Replying to ryandesign@…:
And does the patch in #31306 solve the problem?
Nope on 10.6.8 https://gist.github.com/6fe092bd5a9d626debb1
comment:7 Changed 13 years ago by matt@…
Replying to ryandesign@…:
And does the patch in #31306 solve the problem?
Also, I'm running sudo port install npm
because I get an insufficient permission error when I don't sudo
comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to matt@…:
the creator of node ... asked ... "(if they're not getting the release package from registry.npmjs.org, why not?)"
Here's another post from the author explaining how to install from the distfile instead of from the repository. If there's no particular reason we're not doing that, we should be doing that.
comment:9 follow-up: 10 Changed 13 years ago by tristan.klocke@…
How do I install npm with the patch?
comment:10 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
comment:11 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | tristan.klocke@… added |
---|
comment:12 follow-up: 13 Changed 13 years ago by matt@…
I tried patching the file a second time and still errored out. Recommendations? MacPorts worked fine for npm 0.26 on Snow Leopard about a month ago. Something must have changed. I see a port called rb19-ronn that is used for building manuals and this errors is related to a ronn.js file. Is ronn a dependency that isn't getting installed and is what's erroring out the MacPorts build process?
comment:13 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to matt@…:
I tried patching the file a second time and still errored out. Recommendations?
It is at least a different error than you were seeing initially, but I still don't know why it builds for me but not for you.
MacPorts worked fine for npm 0.26 on Snow Leopard about a month ago. Something must have changed.
You mean 1.0.26, but yes, the port's build process was changed when it was updated to version 1.0.30; you would not have seen this error with an earlier version.
I see a port called rb19-ronn that is used for building manuals and this errors is related to a ronn.js file. Is ronn a dependency that isn't getting installed and is what's erroring out the MacPorts build process?
As I understand it, ronn is used to build the documentation. rb19-ronn is presumably a Ruby 1.9 version of ronn. npm understandably needs a JavaScript version of ronn. npm tries to install this using itself. This succeeds for me and fails for you.
I suggest you wait until the maintainer has a chance to update the port to fetch from a distfile instead of fetching from git, since the distfile includes prebuilt documentation so we will no longer have to try to build it ourselves. (Or the maintainer will explain why he doesn't want to do it that way.)
If you can't wait, install the previous version 1.0.28 using instructions from howto/InstallingOlderPort. (We never had 1.0.29 in MacPorts.)
comment:14 follow-up: 15 Changed 13 years ago by matt@…
Apparently, the installing an older port method isn't working for me. I downloaded the Portfile and single file in the "files" folders and from that directory ran sudo port install
but apparently sudo doesn't have permissions to read the Portfile:
could not read "/Users/Matt/Downloads/npm/Portfile": permission denied
I guess I'll just wait for the npm port to get updated.
comment:15 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to matt@…:
apparently sudo doesn't have permissions to read the Portfile:
Hmm, yes, we've had other reports of that on the mailing list. It seems our decision to ship MacPorts 2 with more restrictions enabled by default (building as another user) is not compatible with some of the practices we used to use, like the ones described in wiki:howto/InstallingOlderPort.
Anyway I have resolved #31306. Has that helped?
comment:16 Changed 13 years ago by matt@…
Didn't work. Current error message: https://gist.github.com/7b9ce60e0c2f734f24c2
comment:17 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
I think this is a parallel build problem so I've turned off parallel building in r84253. Does that help?
comment:18 Changed 13 years ago by matt@…
Do I need to manually apply the patch or can I port sync
to get it?
comment:19 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
You can port sync
. If you're using the default rsync sync method, it can take up to 30 minutes for changes committed to the repository to get mirrored to the rsync server.
comment:20 follow-ups: 21 22 Changed 13 years ago by matt@…
It worked. Thanks!
Will this port be switched over to using the tarball instead of building from Git in the future?
comment:21 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:22 Changed 13 years ago by ci42
Replying to matt@…:
It worked. Thanks!
Will this port be switched over to using the tarball instead of building from Git in the future?
Probably, yes. See: comment:ticket:31353:1
comment:23 Changed 13 years ago by ci42
Replying to ryandesign@…:
He asked why you need to patch it for a Mac when it's developed on a Mac.
You and he are welcome to examine the patchfile to see what we're doing:
trunk/dports/devel/npm/files/patch-scripts-doc-build.sh?rev=84119
As you see we're only patching the line that determines the version of npm. The original source runs "
npm -v
" to do that; that can't possibly work in the context of an in-progress MacPorts build since npm won't have been installed in its final location by that time and so won't be in PATH yet.
Exactly.
also unclear as to why it's running "make" rather than "make install" but maybe they do that in a second step or something"
Yes, that's exactly how MacPorts works. The build phase runs "make". The subsequent destroot phase (which you didn't get to with npm because the build phase failed) would run "make install" (for most ports; the npm port in fact overrides this usual destroot and writes its own; again I don't know why "make install" was not sufficient.)
In case of npm "make install" doesn't respect DESTROOT but rather installs npm right next to the node.js installation. So I had to override the destroot phase in the portfile.
Additionally, I'm on Lion