message: 没有找到可以构建的 NPM 包,请确认需要参与构建的 npm 都在 `miniprogramRoot` 目录内,或配置 project.config.json 的 packNpmManually 和 packNpmRelationList 进行构建 appid: wx7c38d09c8ab9ad36 openid: o6zAJs1I02Vgwrgtu7fVAN-qeuZo ideVersion: 1.06.2303220 osType: darwin-x64 time: 2023-05-21 23:00:41
时间: 2023-06-27 14:05:07 浏览: 123
这个错误提示意味着在构建微信小程序时,NPM 包没有被正确地引入到项目中。请确保你需要使用的 NPM 包已经安装并位于项目的 `miniprogramRoot` 目录中。另外,你还可以在 `project.config.json` 文件中配置 `packNpmManually` 和 `packNpmRelationList` 来手动构建 NPM 包。如果以上方法无法解决问题,请检查你的网络连接是否正常,并尝试重新安装 NPM 包。
相关问题
Vetur can't find `tsconfig.json` or `jsconfig.json` in c:\MyReponsitory\library-management-system-web_1.
Vetur is a VS Code extension for Vue.js development. It requires a `tsconfig.json` or `jsconfig.json` file to provide configuration information for TypeScript or JavaScript respectively.
If you don't already have a `tsconfig.json` or `jsconfig.json` file in your project directory, you can create one by running `tsc --init` or `npm init` respectively.
If you do have one of these files in your project directory, make sure that it is located in the root directory of your project (`c:\MyReponsitory\library-management-system-web_1`), and that its name is spelled correctly (`tsconfig.json` or `jsconfig.json`).
If the file is located in a different directory or has a different name, you can specify its location in your VS Code settings. Open your VS Code `settings.json` file and add the following line:
```
"vetur.validation.template": false,
"vetur.useWorkspaceDependencies": true,
"vetur.experimental.templateInterpolationService": true,
"vetur.format.defaultFormatterOptions": {
"prettier": {
"singleQuote": true,
"semi": false
}
},
"vetur.format.defaultFormatter": {
"prettier": {
"useTabs": true,
"tabWidth": 2,
"singleQuote": true,
"semi": false
}
},
"vetur.validation.interpolation": false,
"vetur.validation.script": false,
"vetur.validation.style": false,
"vetur.ignoreProjectWarning": true,
"vetur.format.options.tabSize": 2,
"vetur.format.options.useTabs": false,
"vetur.format.scriptInitialIndent": false,
"vetur.format.styleInitialIndent": false,
"vetur.format.defaultFormatter.js": "prettier",
"vetur.format.defaultFormatter.html": "prettier",
"vetur.format.defaultFormatter.css": "prettier",
"vetur.format.defaultFormatter.scss": "prettier",
"vetur.format.defaultFormatter.less": "prettier",
"vetur.format.defaultFormatter.postcss": "prettier",
"vetur.validation.templateProps": false,
"vetur.validation.interpolation": false,
"vetur.format.defaultFormatterOptions": {
"prettier": {
"singleQuote": true,
"semi": false
}
},
"vetur.format.enable": true,
"vetur.validation.template": false,
"vetur.useWorkspaceDependencies": true,
"vetur.experimental.templateInterpolationService": true,
"vetur.format.defaultFormatterOptions": {
"prettier": {
"singleQuote": true,
"semi": false
}
},
"vetur.format.defaultFormatter": {
"prettier": {
"useTabs": true,
"tabWidth": 2,
"singleQuote": true,
"semi": false
}
},
"vetur.validation.interpolation": false,
"vetur.validation.script": false,
"vetur.validation.style": false,
"vetur.ignoreProjectWarning": true,
"vetur.format.options.tabSize": 2,
"vetur.format.options.useTabs": false,
"vetur.format.scriptInitialIndent": false,
"vetur.format.styleInitialIndent": false,
"vetur.format.defaultFormatter.js": "prettier",
"vetur.format.defaultFormatter.html": "prettier",
"vetur.format.defaultFormatter.css": "prettier",
"vetur.format.defaultFormatter.scss": "prettier",
"vetur.format.defaultFormatter.less": "prettier",
"vetur.format.defaultFormatter.postcss": "prettier",
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
}
```
In the `"vetur.validation.template"` section, add the following line:
```
"vetur.validation.template": false,
```
This will disable template validation in Vetur, which may be causing the error message you are seeing.
I hope this helps! Let me know if you have any further questions.
阅读全文