我不断得到这个
即使我将loginForm保存在该目录中,也发生elif command == '/random':
with open (text_database) as f:
lines = f.readlines()
while len(lines)>0:
max_int = len(lines)-1 #update the len each loop as we remove one each time
print(lines.pop(random.randint(0, max_int))) #pop a random value from the list
错误,即使我尝试将代码从'Unable to resolve module './app/screens/loginForm' from '/Users/salwabadreddine/Desktop/moappetit/app/screens/navigation.js'
复制并粘贴到loginForm.js
,也会显示正确的输出,并且不会发生任何错误。但是,当我尝试将其从Navigation.js
导入到loginForm
中时,出现了此错误。任何帮助都会很棒。
Navigation.js