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?

More than 1 year has passed since last update.

いろいろ入れたら npm がエラーになる

Posted at

いつの間にか
npm run watch がエラーになってしまっていました。

watch
mix watch

node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module '../package.json'
Require stack:

  • /home/vagrant/docker-laravel-apache/backend/node_modules/.bin/mix
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)

../package.jspn が無いのが原因なんだそうだけど、どこからの相対パスなんだかわからん。
でqiitaでキーワード検索してみると、結構たくさんありました。
mumucochimu 氏の記事と

kuroro_ru 氏の記事がとても参考になりました。

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?