LoginSignup
7
8

More than 5 years have passed since last update.

node.jsをバージョンアップしたら最初にやるべきこと

Last updated at Posted at 2015-04-17

これだけ

node_modules入れ直しの例.
// node_modulesを消して
rm -rf node_modules

// 新たに入れ直し(必要に応じてsudo)
npm install

なんで?

バージョンをあげたら、node_modulesは新しい処理系でビルドし直す必要があるからということです。でも、たまに消さなくても動いちゃうことがあるのでややこしいという。

おまけ

npm installして起動したのにエラーが出る場合は、エラーメッセージで吼えているnpmを探しましょう。
大方、該当のnpm入れ直すと改善します。一度uninstallしてからまたinstallしましょう

swig-email-templates入れ直しの例.
npm uninstall swig-email-templates
npm install swig-email-templates
7
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8