0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Node.js】nodemonが動いたり動かなかったりする

Last updated at Posted at 2025-05-13
1 / 2

問題 nodemonが使えない

Node.jsのファイルをnodemonで起動すると動かない

成功(running nowと出れば動いている)

...directory>nodemon index.js
[nodemon] 3.1.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node index.js`
running now
[nodemon] clean exit - waiting for changes before restart

失敗(running nowが出ていない)

...directory>nodemon index.js
[nodemon] 3.1.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node index.js`

現象 いつ使えて、いつ使えないのか

nodemon index.js
→動かない

node index.js
→動く

npm uninstall node
nodemon index.js
→動くが、後に動かなくなる

npm uninstall node
npm install node
nodemon index.js
→動くが、後に動かなくなる

解決策

ローカルにファイルを移動する

要因

会社で使用しているOneDrive上にファイルがあったため、それに起因する要因でこの現象が起きていたようです

上記のような現象になった際、モジュールを入れたり消したりしていると権限エラーが出てきて気がつきました

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?