Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"npm run dev" error #7

Open
CodingGorit opened this issue May 15, 2022 · 2 comments
Open

"npm run dev" error #7

CodingGorit opened this issue May 15, 2022 · 2 comments

Comments

@CodingGorit
Copy link

problem

[18:22:50] Error: File not found with singular glob: C:\Users\Gorit\Desktop\test\miniprogram_dev\package.json (if this was purposeful, use allowEmpty option)
at Glob. (C:\Users\Gorit\Desktop\test\node_modules\glob-stream\readable.js:84:17)
at Object.onceWrapper (events.js:422:26)
at Glob.emit (events.js:315:20)
at Glob.EventEmitter.emit (domain.js:467:12)
at Glob._finish (C:\Users\Gorit\Desktop\test\node_modules\glob\glob.js:194:8)
at done (C:\Users\Gorit\Desktop\test\node_modules\glob\glob.js:179:14)
at Glob._processSimple2 (C:\Users\Gorit\Desktop\test\node_modules\glob\glob.js:688:12)
at C:\Users\Gorit\Desktop\test\node_modules\glob\glob.js:676:10
at Glob.stat2 (C:\Users\Gorit\Desktop\test\node_modules\glob\glob.js:772:12)
at lstatcb
(C:\Users\Gorit\Desktop\test\node_modules\glob\glob.js:764:12)

solve

use devDependencies like this

  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^2.28.0",
    "@typescript-eslint/parser": "^2.28.0",
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.5",
    "babel-plugin-module-resolver": "^3.2.0",
    "babel-preset-env": "^1.7.0",
    "colors": "^1.3.1",
    "eslint": "^5.14.1",
    "eslint-config-airbnb-base": "13.1.0",
    "eslint-loader": "^2.1.2",
    "eslint-plugin-import": "^2.16.0",
    "eslint-plugin-node": "^7.0.1",
    "eslint-plugin-promise": "^3.8.0",
    "glob": "7.2.0",
    "gulp": "^4.0.0",
    "gulp-clean": "^0.4.0",
    "gulp-if": "^2.0.2",
    "gulp-install": "^1.1.0",
    "gulp-less": "^4.0.1",
    "gulp-rename": "^1.4.0",
    "gulp-sourcemaps": "^2.6.5",
    "jest": "^23.5.0",
    "miniprogram-api-typings": "^2.10.3-1",
    "miniprogram-simulate": "^1.2.5",
    "thread-loader": "^2.1.3",
    "through2": "^2.0.3",
    "ts-loader": "^7.0.0",
    "typescript": "^3.8.3",
    "vinyl": "^2.2.0",
    "webpack": "^4.29.5",
    "webpack-node-externals": "^1.7.2"
  },
@CodingGorit
Copy link
Author

Problem recurrence

  1. use miniprogram init --type custom-component command generate a template project, after installing all the devDependencies.
  2. and run "npm run dev" will lead the problem

@JuneAndGreen
Copy link
Contributor

  1. check whether tools/demo/package.json exists ?
  2. if it exists, remove dir miniprogram_dev and rerun npm run dev

According to tools/config.js, tools/demo will be copied to miniprogram_dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants