<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>npm &#8211; FITSブログ</title>
	<atom:link href="https://blog.fits-inc.jp/tag/npm/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.fits-inc.jp</link>
	<description>Webシステムの受託開発でお困りなら</description>
	<lastBuildDate>Thu, 08 Oct 2020 13:33:34 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://blog.fits-inc.jp/wp-content/uploads/2024/06/cropped-image-5-32x32.png</url>
	<title>npm &#8211; FITSブログ</title>
	<link>https://blog.fits-inc.jp</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>npm WARN optional SKIPPING OPTIONAL DEPENDENCY の解消方法について</title>
		<link>https://blog.fits-inc.jp/2020/10/08/npm-warn-optional-skipping-optional-dependency-%e3%81%ae%e8%a7%a3%e6%b6%88%e6%96%b9%e6%b3%95%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/</link>
		
		<dc:creator><![CDATA[FITS Admin]]></dc:creator>
		<pubDate>Thu, 08 Oct 2020 13:33:34 +0000</pubDate>
				<category><![CDATA[技術ブログ]]></category>
		<category><![CDATA[fsevents]]></category>
		<category><![CDATA[npm]]></category>
		<category><![CDATA[SKIPPING OPTIONAL DEPENDENCY]]></category>
		<guid isPermaLink="false">https://blog.fits-inc.jp/?p=749</guid>

					<description><![CDATA[　本日npmで作業を行っている際に が赤字で表示されたので、気になって調査した結果をまとめました。 　この表示自体は、Mac 環境で必要となるfsevents のインストールが Linux 環境であったためスキップされた [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">　本日npmで作業を行っている際に</p>



<pre class="wp-block-code"><code>npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/pm2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})</code></pre>



<p class="wp-block-paragraph">が赤字で表示されたので、気になって調査した結果をまとめました。</p>



<p class="wp-block-paragraph">　この表示自体は、Mac 環境で必要となるfsevents のインストールが Linux 環境であったためスキップされた、という表示です。</p>



<p class="wp-block-paragraph">　解消方法を調べると -f オプションをつけるという方や、&#8211;no-optional オプションをつけろという方、また package.json の optionalDependencies に設定しろ、という話が Qiita や Stack Overflow で見つかります。</p>



<p class="wp-block-paragraph">　その後も調査すると経緯として、オプショナルなパッケージへの依存関係によってインストールが失敗した場合のログレベルについての議論が下記であり<br><a href="https://github.com/npm/cli/pull/169">https://github.com/npm/cli/pull/169</a><br>さらにこちらでも言及されているのですが<br><a href="https://github.com/npm/cli/issues/1112">https://github.com/npm/cli/issues/1112</a><br>結論としては</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Fixing the “noisy chokidar/fsevents” problem, and how this is related to <a href="https://t.umblr.com/redirect?z=https%3A%2F%2Fgithub.com%2Fnpm%2Frfcs%2Fblob%2Flatest%2Faccepted%2F0017-add-funding-support.md&amp;t=N2NjNTJiZjY3MDc4NmU2NDNhMTM3MzY3Zjc4MWUwNjkzYzdkMGMyOCxHVUx1SXFSNA%3D%3D&amp;b=t%3AnXsLs1P4AptPf1fBr_nFxw&amp;p=https%3A%2F%2Fblog.npmjs.org%2Fpost%2F617484925547986944%2Fnpm-v7-series-introduction&amp;m=1&amp;ts=1602163578">npm fund</a>.</p><cite>https://blog.npmjs.org/post/617484925547986944/npm-v7-series-introduction</cite></blockquote>



<p class="wp-block-paragraph">からわかるように、npmのv7でこの修正が入るようです。</p>



<p class="wp-block-paragraph">　なので、fsevents に対する npm WARN optional SKIPPING OPTIONAL DEPENDENCY については、上記の経緯をプロジェクトに対してきちんと説明でき共通認識が持てるのであれば、特段抑止のための修正をプロジェクト内部で入れなくても良い、と結論づけました。</p>



<h2 class="wp-block-heading">仙台で node や docker で環境構築できる会社をお探しなら</h2>



<p class="wp-block-paragraph">　もし、仙台で node や docker を用いた環境構築が可能なベンダーをお探しであれば、我々 <a href="https://www.fits-inc.jp" title="https://www.fits-inc.jp">ＦＩＴＳ</a> がお力になれるかもしれません。システム開発などでお困りの際は、ぜひお問い合わせフォームよりお声がけください。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
