大佬教程收集整理的这篇文章主要介绍了找不到模块 ./environment,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
require
或任何与 environment
相关的东西,所以我不知道如何解决这个问题。
@H_618_2@我尝试了 npm install environment
,结果出现错误。
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" Could not be run
gyp ERR! find Python checking if Python is C:\python37\python.exe
gyp ERR! find Python - "C:\python37\python.exe" Could not be run
@H_618_2@我认为这是由 const {func} = require('../../server.Js');
和 @H_389_3@module.exports = {func}; 导出/导入我的变量引起的,当我删除它时,环境错误不存在(但我需要此代码。)
@H_618_2@public/server.Js
const func = {
myID: "690173341104865310",sampleFunction: function (text,moreText) {
return `<@\$authorID> I'm returning ${text} and ${moreText} from func.sampleFunction`
},}
module.exports = {func};
@H_618_2@public/_commands/_utility/eval.Js
const {func} = require('../../server.Js');
module.exports = {
name: "eval",code: `
$eval[$message]
$onlyIf[$userID[$username]==${func.myID}]
`
};
@H_618_2@另外,这是我的package.Json
{
"name": "wink","version": "1.0.0","description": "","main": "server.Js","scripts": {
"start": "node public/server.Js"
},"ENGInes": {
"node": "12.x"
},"author": "","license": "ISC","dependencIEs": {
"@discordJs/node-pre-gyp": "^0.2.0","@discordJs/opus": "^0.4.0","dbd.db": "^1.3.14","dbd.Js": "^2.2.0","dotenv": "^8.2.0","python": "0.0.4"
},"prettIEr": {
"TrailingComma": "es5","tabWIDth": 4,"semi": false,"singleQuote": false
}
}
以上是大佬教程为你收集整理的找不到模块 ./environment全部内容,希望文章能够帮你解决找不到模块 ./environment所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。