Homestead executes npm run dev error missing script: dev

execute various npm run dev, errors when using homestead:

  1. Cannot find module node_modules/cross-env/dist/bin/cross-env.js

    npm I cross-env

  2. peer independence depends on error reporting
    npm I npm-install-peers
  3. no such file or directory, open"/ home/vagrant/package.json" error
    npm init
  4. 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?

Mar.18,2021

package.json does not have "scripts": {"dev": "xxx"}


, but still report an error
clipboard.png


will still report an error, and the reconstruction can start, but putting the previously written code will not work

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea57f4-1d64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea57f4-1d64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?