MacにNode.jsをインストールしてましたがnpm run devで以下のエラーが出てしまいました。
※Homebrewを用いてます
#事象
npm run devすると
npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /Users/tom/package.json npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/Users/tom/package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /Users/tom/.npm/_logs/2020-06-15T05_40_09_174Z-debug.log
#試したこと
・brew install nodebrewでnodebrewインストール。()
・nodebrew install-binary stableでnode.jsのインストール
バージョン確認コマンドでちゃんとインストールできてるか確認。
////nodebrewの確認
$ nodebrew -v nodebrew 1.0.1 Usage: nodebrew help Show this message nodebrew install <version> Download and install <version> (from binary) nodebrew compile <version> Download and install <version> (from source) nodebrew install-binary <version> Alias of `install` (For backward compatibility) nodebrew uninstall <version> Uninstall <version> nodebrew use <version> Use <version> nodebrew list List installed versions nodebrew ls Alias for `list` nodebrew ls-remote List remote versions nodebrew ls-all List remote and installed versions nodebrew alias <key> <value> Set alias nodebrew unalias <key> Remove alias nodebrew clean <version> | all Remove source file nodebrew selfupdate Update nodebrew nodebrew migrate-package <version> Install global NPM packages contained in <version> to current version nodebrew exec <version> -- <command> Execute <command> using specified <version> Example: # install nodebrew install v8.9.4 # use a specific version number nodebrew use v8.9.4
////node.jsの確認
$ node -v v14.4.0 $ nodebrew ls v14.4.0 current: v14.4.0
////パスも通っている
$ npm Usage: npm <command> where <command> is one of: access, adduser, audit, bin, bugs, c, cache, ci, cit, clean-install, clean-install-test, completion, config, create, ddp, dedupe, deprecate, dist-tag, docs, doctor, edit, explore, fund, get, help, help-search, hook, i, init, install, install-ci-test, install-test, it, link, list, ln, login, logout, ls, org, outdated, owner, pack, ping, prefix, profile, prune, publish, rb, rebuild, repo, restart, root, run, run-script, s, se, search, set, shrinkwrap, star, stars, start, stop, t, team, test, token, tst, un, uninstall, unpublish, unstar, up, update, v, version, view, whoami npm <command> -h quick help on <command> npm -l display full usage info npm help <term> search for help on <term> npm help npm involved overview Specify configs in the ini-formatted file: /Users/tom/.npmrc or on the command line via: npm <command> --key value Config info can be viewed via: npm help config npm@6.14.5 /Users/tom/.nodebrew/node/v14.4.0/lib/node_modules/npm
お詳しい方がいましたらよろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/06/15 11:34 編集
2020/06/16 05:40
2020/06/16 10:07