execute various npm run dev, errors when using homestead:
- Cannot find module node_modules/cross-env/dist/bin/cross-env.js
npm I cross-env
- peer independence depends on error reporting
npm I npm-install-peers
- no such file or directory, open"/ home/vagrant/package.json" error
npm init
- the latest problem, execute npm run dev error report: missing script: dev
npm ERR! missing script: dev
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2018-05-30T03_23_37_043Z-debug.log
vagrant@homestead:~$ cat /home/vagrant/.npm/_logs/2018-05-30T03_23_37_043Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ "/usr/bin/node", "/usr/bin/npm", "run", "dev" ]
2 info using npm@6.1.0
3 info using node@v8.11.2
4 verbose config Skipping project config: /home/vagrant/.npmrc. (matches userconfig)
5 verbose stack Error: missing script: dev
5 verbose stack at run (/usr/lib/node_modules/npm/lib/run-script.js:151:19)
5 verbose stack at /usr/lib/node_modules/npm/lib/run-script.js:61:5
5 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:115:5
5 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:418:5
5 verbose stack at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:373:45)
5 verbose stack at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:416:3)
5 verbose stack at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:160:5)
5 verbose stack at ReadFileContext.<anonymous> (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:332:20)
5 verbose stack at ReadFileContext.callback (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16)
5 verbose stack at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)
6 verbose cwd /home/vagrant
7 verbose Linux 4.15.0-20-generic
8 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
9 verbose node v8.11.2
10 verbose npm v6.1.0
11 error missing script: dev
12 verbose exit [ 1, true ]
does any boss encounter this problem?