<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hahaeatora</author_name>
  <author_url>https://blog.hatena.ne.jp/hahaeatora/</author_url>
  <blog_title>ダークサイドにようこそ!</blog_title>
  <blog_url>https://hahaeatora.hateblo.jp/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>Next.js 製アプリの Node.js 環境で軽めの ts ファイルを実行したいとき（DB用のシーダーなど）、詰まったので備忘録です。 ※Node 23 からTS実行できるらしいのですが、そちらはまだ試してません。 www.totaltypescript.com そのままだとTypeScript動かせないのでts-nodeをインストール。 コード内のimport文でエラー。 Next.jsデフォルト設定だとtsconfig.jsonのcompilerOptionsで「&quot;module&quot;: &quot;esnext&quot;」となっているが、Node.jsはデフォルトのCommonJS環境（require使う方…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhahaeatora.hateblo.jp%2Fentry%2F2025%2F01%2F22%2F200000&quot; title=&quot;Next.js 環境の Node.js で ts ファイルを実行する - ダークサイドにようこそ!&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/148141593/1533472151314109</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-01-22 20:00:00</published>
  <title>Next.js 環境の Node.js で ts ファイルを実行する</title>
  <type>rich</type>
  <url>https://hahaeatora.hateblo.jp/entry/2025/01/22/200000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
