1. 概要
2018年5月18日に発生。
$ pkg version -vl "<"
npm-5.8.0 < needs updating (index has 5.10.0)
とのことで
$ portupgrade -Rr npm
[Reading data from pkg(8) ... - 384 packages found - done]
[Gathering depends for www/npm .................................................................... done]
[Exclude up-to-date packages ........................ done]
---> Upgrading 'npm-5.8.0' to 'npm-5.10.0' (www/npm)
---> Building '/usr/ports/www/npm'
===> Cleaning for node-10.1.0_1
===> Cleaning for npm-5.10.0
===> License APACHE20 accepted by the user
・・・中略・・・
====> Compressing man pages (compress-man)
===> Installing for node-10.1.0_1
===> Checking if node already installed
===> Registering installation for node-10.1.0_1 as automatic
Installing node-10.1.0_1...
pkg-static: node-10.1.0_1 conflicts with node8-8.11.1_1 (installs files into the same place). Problematic file: /usr/local/bin/node
*** Error code 70
Stop.
make[3]: stopped in /usr/ports/www/node
*** Error code 1
Stop.
make[2]: stopped in /usr/ports/www/node
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/www/npm
*** Error code 1
Stop.
make: stopped in /usr/ports/www/npm
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20180518-42334-1drl5th env UPGRADE_TOOL=portupgrade UPGRADE_PORT=npm-5.8.0 UPGRADE_PORT_VER=5.8.0 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
! www/npm (npm-5.8.0) (unknown build error)
うむ、これは「sass」で「gulp」を使うために使用している「npm」と「node」の問題で・・・。
あちこちに書き散らしているので、どこに書いたものか困ったもんですが・・・。
2. node のバージョンを変更する
> pkg version -vn npm
npm-5.8.0 < needs updating (index has 5.10.0)
> pkg version -vn node8
node8-8.11.1_1 = up-to-date with index
確か、「npm-5.8」が「node10」に対応していなかったので、「node8」をインストールしていたのです。
果たして「npm-5.10」は「node10」に対応しているのかしら?
「node8」をアンインストールして「node10」をインストールします。
cd /usr/ports/www/node8
make deinstall
cd /usr/ports/www/node
make
make install
「make install」で
===> Installing for node-10.1.0_1
===> Checking if node already installed
===> Registering installation for node-10.1.0_1
Installing node-10.1.0_1...
Note: If you need npm (Node Package Manager), please install www/npm.
って言われました・・・。
知ってるわよ・・・。
これで「portupgrade」は、正常に終了です。
$ portupgrade -Rr npm
[Reading data from pkg(8) ... - 384 packages found - done]
[Gathering depends for www/npm .................................................................... done]
[Exclude up-to-date packages ......................... done]
---> Upgrading 'npm-5.8.0' to 'npm-5.10.0' (www/npm)
---> Building '/usr/ports/www/npm'
===> Cleaning for node-10.1.0_1
===> Cleaning for npm-5.10.0
===> License APACHE20 accepted by the user
===> npm-5.10.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by npm-5.10.0 for building
・・・中略・・・
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):
Installed packages to be REMOVED:
npm-5.8.0
Number of packages to be removed: 1
The operation will free 21 MiB.
[1/1] Deinstalling npm-5.8.0...
[1/1] Deleting files for npm-5.8.0: 100%
[Reading data from pkg(8) ... - 383 packages found - done]
---> Installing the new version via the port
===> Installing for npm-5.10.0
===> Registering installation for npm-5.10.0
Installing npm-5.10.0...
===> Cleaning for npm-5.10.0
---> Cleaning out obsolete shared libraries
3. gulp は正常に動作するのか?
さて、ここで問題になるのが・・・、「gulp」は正常に動作するのか?ということです。
一般ユーザに戻って
> gulp exp
gulp[69082]: ../src/node_contextify.cc:628:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.
1: node::Abort(void) [/usr/local/bin/node]
2: node::Assert(char const* const[4]*) [/usr/local/bin/node]
3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<node::contextify::ContextifyScript::New::Value> const&) [/usr/local/bin/node]
4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node]
5: v8::internal::Isolate*<v8::internal::Object> v8::internal::Builtins::InvokeApiFunction(v8::internal::Isolate*, bool, v8::internal::Handle<v8::internal::HeapObject>(int, v8::internal::Object*, v8::internal::HeapObject) [/usr/local/bin/node]
6: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
アボート(coreを出力しました)
うむ、そんな気はしていたのだわ。
さてここからは「HTML - Autoprefixer(Node.js・gulp)」で・・・。
失敗したら、また戻ってきます。